%Book Title: Practical Design and Application of Linear MPC
%Chapter: 8
%Section: 4
%Authors: Nassim Khaled and Bibin Pattel
%Last Modified: 1/16/2018
close all
%% System Identification of PV Cell
%% Simulate the model
sim('Chapter_8_Section_4_Model')
%% Create time vector
Time=0:1:length(Lambda_UV)-1;
%% Change plotting settings
set(0,'DefaultLineLineWidth',1)
set(0,'DefaultAxesFontWeight','bold')
set(0,'DefaultAxesFontName','Arial')
set(0,'DefaultAxesFontSize',12)
%% Grouping simulation data and neglecting first few seconds(Nstart*stp_sz)
Nstart =2000; %Clip the data starting from Nstart as the first few seconds of the simulation should be discarded
Measured_Outputs=[ Tm_f(Nstart:end)]; %Measured outputs
Manipipulated_Variables=[ Lambda_UV(Nstart:end) ];% Pout_previous ]; %Manipulated variables
%% Obtaining initial conditions at step time=Nstart
Measured_Outputs_Nstart=Measured_Outputs(1,:); %Capturing the measured outputs at step time= Nstart
Manipipulated_Variables_Nstart=Manipipulated_Variables(1,:); %Capturing the manipulated variables at step time= Nstart
%% Forcing response to start from zero initial conditions
Measured_Outputs_zero_initial_conditions=Measured_Outputs(1:end,:)-repmat(Measured_Outputs_Nstart,length(Measured_Outputs(1:end,:)),1); %Subtracting initial conditions for measured outputs to obtain zero response at step time= Nstart
Manipipulated_Variables_zero_initial_conditions=Manipipulated_Variables(1:end,:)-repmat(Manipipulated_Variables_Nstart,length(Manipipulated_Variables(1:end,:)),1); %Subtracting initial conditions for manipulated variables to obtain zero actuation at step time= Nstart
%% Prepare date for system identification
stp_sz=10
data=iddata(Measured_Outputs_zero_initial_conditions(1:stp_sz:end,:),Manipipulated_Variables_zero_initial_conditions(1:stp_sz:end,:),stp_sz); %data is packaged for system identification using iddata
%% Generate a preliminary 3rd order system that fits the data
sys1=n4sid(data,3,'Form','canonical','DisturbanceModel','None','InputDelay',[0 ]','InitialState','zero'); %n4sid generates a preliminary system in the canonical form
%% Generate a more refined system
sys2 = pem(data,sys1,'InitialState','zero') %pem generates a more refined system that fits the data better
%% Define the options for comparing the various identified systems
opt = compareOptions('InitialCondition','Z');
%% Plot the comparison between the simulation data and the identified system sys2
figure
compare(data,sys2,opt);
%% Extract A, B, C and D matrices from sys2
A=sys2.A
B=sys2.B
C=sys2.C
D=sys2.D
%% Use the ss command to represent the results from sys2 in a state space format
PV_Linear_Model = ss(A,B,C,D,stp_sz)
save Chapter_8_Section_4_Linear_Model.mat PV_Linear_Model
没有合适的资源?快使用搜索试试~ 我知道了~
太阳能电池的模型预测控制设计
共43个文件
mat:32个
slx:5个
m:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 14 浏览量
2022-04-20
00:04:50
上传
评论
收藏 3.71MB ZIP 举报
温馨提示
一个太阳能电池的模型预测控制设计,适合模型预测学习的人参考学习交流。 A solar cell model predictive control design, suitable for model predictive learning people reference learning communication
资源推荐
资源详情
资源评论
收起资源包目录
太阳能电池的模型预测控制设计.zip (43个子文件)
太阳能电池的模型预测控制设计
Section_4
system_ID_PV_Module.m 3KB
PV_model_data.mat 494KB
Chapter_8_Section_4_Linear_Model.mat 914B
Chapter_8_Section_4_Model.slx 29KB
slprj
_sfprj
precompile
KTGIcOB0EQx7xXBnU34maB.mat 894B
autoInferAccessInfo.mat 857B
Ic5Ow16NT8qD0ohfzjgggF.mat 920B
EMLReport
emlReportAccessInfo.mat 726B
sRQQN3lUOWteSVoivFEzOG.mat 288KB
System_ID_PV
_self
sfun
info
binfo.mat 756B
_jitprj
sRQQN3lUOWteSVoivFEzOG.l 116KB
jitEngineAccessInfo.mat 724B
sRQQN3lUOWteSVoivFEzOG.mat 685B
System_ID_PV.slx 29KB
sys.mat 900B
Chapter_8_Section_4_Script.m 3KB
Section_7
PV_model_data.mat 494KB
Chapter_8_Section_7_Model_and_Controller.slx 30KB
Chapter_8_Section_7_MPC_Controller.mat 2KB
results.mat 600KB
Chapter_8_Section_7_Model.slx 28KB
Section_6
Chapter_8_Section_6_Linear_Model.mat 958B
MPC_DesignTask_Chapter_8_Section_6.mat 4KB
Chapter_8_Section_4_Linear_Model.mat 914B
Section_3
Output_Data.mat 306KB
DOE_PV_Module.slx 27KB
Data_PV_Module.mat 494KB
slprj
_sfprj
precompile
KTGIcOB0EQx7xXBnU34maB.mat 894B
autoInferAccessInfo.mat 849B
Ic5Ow16NT8qD0ohfzjgggF.mat 920B
MYc33phBirAxvn072sgYnH.mat 955B
oh4OcHUK6IpUWWDhyCFXkG.mat 925B
EMLReport
emlReportAccessInfo.mat 779B
sRRYQIFnjYdyiRztDjS0jJG.mat 287KB
sRQQN3lUOWteSVoivFEzOG.mat 287KB
DOE_PV_Module
_self
sfun
info
binfo.mat 748B
_jitprj
sRQQN3lUOWteSVoivFEzOG.l 116KB
sRRYQIFnjYdyiRztDjS0jJG.mat 686B
jitEngineAccessInfo.mat 779B
sRRYQIFnjYdyiRztDjS0jJG.l 117KB
sRQQN3lUOWteSVoivFEzOG.mat 686B
ALL_Data.mat 306KB
Chapter_8_section_3.m 2KB
共 43 条
- 1
资源评论
wouderw
- 粉丝: 328
- 资源: 2961
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功