1. 程式人生 > 其它 >【資料分析】基於matlab GUI歐洲汽車二氧化碳排放罰款計算【含Matlab原始碼 1052期】

【資料分析】基於matlab GUI歐洲汽車二氧化碳排放罰款計算【含Matlab原始碼 1052期】

一、簡介

不少專家都指出,要實現有效的減排,首先要做的就是建立一個科學的碳排放核算機制,無論是對實現減排的獎勵,還是對減排不力的懲罰,都需要一個基於科學、合理、可量化的核算體制。

實際上,從上世紀 90 年代人們就已經開始量化各種溫室氣體 ( 主要是二氧化碳 ) 的排放,以瞭解其對全球大氣的影響。據專家介紹,全球總的碳排放量可以通過諸多方法確定,如巨集觀模型、直接測量、計算和估算等。但是,如果具體到某一國家、某一企業甚至某個人的排放量,主要是統計出來的,而不是檢測出來的。

隨著環保和低碳概念越來越深入人心,網路上出現了各種版本的碳排放計算器,可以用來評價生活中的碳排放量。一些專業組織和行業機構也會推出一些針對某一 行業和領域的碳排放測算系統。但是記者瞭解發現,無論是針對個人的碳排放計算器,還是針對企業的碳排放評測系統,都有很多版本和標準,得出的結論也不盡相 同。

全球最大的能源企業之一 BP 是率先推出碳排放計算器 ( 現更名為“能源計算器” ) 的公司或組織之一。 BP 中國能源計算器專案的相關負責人張磊告訴《中國經濟週刊》, BP 的能源計算器主要有兩個版本:一個是面向普通消費者的簡單版本,其主要目的是讓一般消費者瞭解自己的日常行為與碳排放之間的關係,從而採取低碳生活方式,進而達到保護環境的目的。

另一個是主要為學校專門開發的用於教育目的的版本,主要用於鼓勵學生的探究式學習,以及讓學生用碳排放計算器作為工具,引發更多對於可持續發展、氣候變化的關注。

至於一些日常行為,比如用電,是如何轉化成碳排放量的,張磊表示,相關的後臺公式是相當複雜的,即使提供,一般人也很難理解。

國內著名的環保 NGO ——山水自然保護中心也有一款碳排放計算器。該中心宣傳交流顧問耿棟告訴《中國經濟週刊》,各種版本碳排放計算器的結果有差別,主要是由採用不同的轉換系數造成的。比如,節約 1 度電所減少的碳排放是多少,主要由“ _ 度電×轉換系數 =_ 千克二氧化碳”這樣的公式計算得來,山水版計算器的轉化係數是 0.785 ,而有的計算器則是 0.997 。

“我們的轉換系數,是與國家發改委能源研究所共同探討得出的。”耿棟表示。具體而言,以用電為例,中國是以火力發電為主的國家,也就說主要是通過燃燒煤、石油及其製品、天然氣等燃料所得到的熱能進行發電的。通過科學的統計,在一般情況下,發 1 度電如果需要消耗 0.4 千克 標準煤,而燃燒 1 千克 標準煤會產生的二氧化碳大約是 2.5 千克 二氧化碳,那麼節約 1 度電就可視為減排了 1 千克 的二氧化碳。

雖然由煤到電的轉換我們可以在實驗室中得到理論值,但這在現實中是不可能的,所以一般使用的是國家發改委和國家統計局公佈的統計數字。不過這個數字也不是一成不變,比如 2000 年的時候,中國火電廠平均每度電的煤耗是 0.392 千克 標準煤,而目前已經下降到 0.36 千克 左右,預計到 2020 年可以下降到 0.32 千克 。

耿棟表示,國家統計局和發改委都是目前中國碳排放核算最權威的資料來源,但是,“中國有中國的標準,國外有國外的標準,肯定是不一樣的,否則哥本哈根會議也不會吵起來。”

減排的商業空間:

技術、標準和碳關稅

著名經濟學家斯蒂格利茨說:“在下一個 10 年,我們 ( 美國 ) 要做的就是利用一切機會,將減緩全球變暖產生的需求轉化為市場”。

發達國家一方面以正義的、無懈可擊的理由推動全球減碳,另一方面把已經準備好的相關技術和裝置推向全球,特別是發展中國家,以謀求下一輪經濟增長的制高點,這早已不是什麼祕密。

著名學者郎鹹平就曾表示,“在出口技術和裝置的同時,美國一定會制定一套全球最為嚴格的標準,要想達標,你必須購買上述技術和裝置。”

2007 年,世界經濟論壇 (World Economic Forum) 的下屬機構氣候披露標準委員會 (CDSB , Climate Disclosure Standards Board) 在瑞士達沃斯宣佈成立,其首個倡議就是推動建立一個碳排放釋出國際標準。

CDSB 還 同時公佈了一份經包括數家國際知名的會計企業在內的專家小組起草的計劃書,希望推動企業積極披露其碳排放情況,並希望碳排放報告成為企業年報的組成部分。 之後,普華永道會計師事務所還更進一步,編撰並公佈了業內第一份環保報告範本,來說明企業應該如何撰寫關於碳排放的披露內容

 美國、歐洲和日本的很多環保組織也越來越多地出現在中國,說服中國各地政府和企業,按照他們的體系核算自己的碳排放。比如,今年 6 月,美國加州環境保護局局長琳達·亞當斯就專程來京,力薦他們的“能效與碳註冊 (ECR) 系統建設專案”,希望把加州的先進經驗在中國得到推廣。

早在幾年前,歐美日等發達國家就先後出臺了關於碳排放核算和監督的標準規範,並且已經有大量的公司開始從事算“碳賬”的業務,圍繞碳排放的檢測與核算已經逐漸形成產業鏈,一條發展中國家可能需要大量進口的產業鏈。

“絕大多數中國的 CMD( 清潔發展機制 ) 專案,都是國外中介公司做的。”一位業內人士告訴《中國經濟週刊》。

  但是,記者日前從國家標準委瞭解到,由中國標準化研究院組織制定的 3 項溫室氣體排放國家標準已於今年 1 月完成報批稿,只待國際標準化組織 (ISO) 正在制定的一系列國際標準釋出後即轉化為中國的國家標準。

這個專案自 2006 年開始就展開了前期研究,內容圍繞溫室氣體管理標準體系構建、國際相關標準、溫室氣體量化方法學、緩解溫室氣體排放相關標準和政策、企業溫室氣體排放清單及排放源調查監測規範等諸多方面,為我國的溫室氣體排放標準奠定了基礎。

但是,即使中國在這方面有了科學的、被國際認可的標準,也並不意味著問題就此解決。因為不少專家早已開始擔心,今後碳排放標準極有可能成為新的綠色貿易壁壘。

“碳關稅”早已正式進入美國、法國等國的政策層面,美國已經開始提出,如果他國不按照美國標準進行減排,就要對他國商品徵收碳關稅。

中國應打出自己的減排特色牌

發達國家竭力推動節能減排,背後隱藏的“小算盤”不容忽視。“哥本哈根談論環境問題,表面是為了保護環境,而背後的實質實際上是在爭奪經濟發展和對外貿易的主導權。” 國家環境諮詢委員會委員、中國環境資源法研究會副會長、中國政法大學教授和博士生導師孫佑海在接受《中國經濟週刊》採訪時指出。
孫佑海認為,歐盟之所以積極地推動減排,主要還是因為歐盟現在經濟發展缺乏活力,外貿的競爭力很弱,但是他們已經擁有碳捕捉、碳儲存等先進技術,如果能將這些技術賣出去,就會使其擺脫目前外貿疲軟的現狀,並進而爭取經濟發展和對外貿易的制高點和經濟發展的主導權。

美國方面,其在小布什政府期間退出《京都議定書》,在喪失全球政治的“道德高點”的同時,也將“低碳政治”的話語權拱手讓給了歐洲。但奧巴馬政府上臺 後,由於與小布什政府代表著不同的利益集團,故而順應時勢,積極推動“綠色經濟”,大力發展新能源和替代產業,希望能夠重新掌握“低碳政治”話語權。

相比之下,孫佑海認為,中國在節能減排方面不能被歐盟、美國牽著走,應該打出自己的特色牌。雖然中國目前還處在自主減排的階段,但是今後的減排壓力一定會越來越大,而且如果不跟進,就不能融入世界經濟的主流。對此,孫佑海提出了四點建議:一是不能再單純地追求 GDP ;二是加大技術的提升,在保證經濟增長的同時實現減排;三是加強管理,特別是立法;四是全民提高節能環保的意識,樹立低碳的生活觀念。

“立法上,其實已經做得比較好了,已經有了相關法律,比如《可再生能源法》、《節約能源法》、《迴圈經濟促進法》、《清潔生產促進法》等等。”孫佑海還透露,中國已經在研究和醞釀實行碳稅和發展碳匯,並且會在適當時機推出。

二、原始碼

function varargout = CO2(varargin)
% CO2 M-file for CO2.fig
%      CO2, by itself, creates a new CO2 or raises the existing
%      singleton*.
%
%      H = CO2 returns the handle to a new CO2 or the handle to
%      the existing singleton*.
%
%      CO2('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in CO2.M with the given input arguments.
%
%      CO2('Property','Value',...) creates a new CO2 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before CO2_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to CO2_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help CO2

% Last Modified by GUIDE v2.5 16-Jul-2020 15:11:42

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @CO2_OpeningFcn, ...
                   'gui_OutputFcn',  @CO2_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before CO2 is made visible.
function CO2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to CO2 (see VARARGIN)

% Choose default command line output for CO2
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes CO2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = CO2_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;



function a1_Callback(hObject, eventdata, handles)
% hObject    handle to a1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a1 as text
%        str2double(get(hObject,'String')) returns contents of a1 as a double


% --- Executes during object creation, after setting all properties.
function a1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a2_Callback(hObject, eventdata, handles)
% hObject    handle to a2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a2 as text
%        str2double(get(hObject,'String')) returns contents of a2 as a double


% --- Executes during object creation, after setting all properties.
function a2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a3_Callback(hObject, eventdata, handles)
% hObject    handle to a3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a3 as text
%        str2double(get(hObject,'String')) returns contents of a3 as a double


% --- Executes during object creation, after setting all properties.
function a3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a4_Callback(hObject, eventdata, handles)
% hObject    handle to a4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a4 as text
%        str2double(get(hObject,'String')) returns contents of a4 as a double


% --- Executes during object creation, after setting all properties.
function a4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a5_Callback(hObject, eventdata, handles)
% hObject    handle to a5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a5 as text
%        str2double(get(hObject,'String')) returns contents of a5 as a double


% --- Executes during object creation, after setting all properties.
function a5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a6_Callback(hObject, eventdata, handles)
% hObject    handle to a6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a6 as text
%        str2double(get(hObject,'String')) returns contents of a6 as a double


% --- Executes during object creation, after setting all properties.
function a6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a7_Callback(hObject, eventdata, handles)
% hObject    handle to a7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a7 as text
%        str2double(get(hObject,'String')) returns contents of a7 as a double


% --- Executes during object creation, after setting all properties.
function a7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a8_Callback(hObject, eventdata, handles)
% hObject    handle to a8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a8 as text
%        str2double(get(hObject,'String')) returns contents of a8 as a double


% --- Executes during object creation, after setting all properties.
function a8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function a9_Callback(hObject, eventdata, handles)
% hObject    handle to a9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of a9 as text
%        str2double(get(hObject,'String')) returns contents of a9 as a double


% --- Executes during object creation, after setting all properties.
function a9_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function b1_Callback(hObject, eventdata, handles)
% hObject    handle to b1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of b1 as text
%        str2double(get(hObject,'String')) returns contents of b1 as a double


% --- Executes during object creation, after setting all properties.
function b1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

三、執行結果

四、備註

版本:2014a
完整程式碼或代寫加1564658423