- Using plain MATLAB code
- Using llinear analysis tool and linearize (inbuilt function) by MATLAB
Linearization of higly non-linear model
6 次查看(过去 30 天)
显示 更早的评论
Does someone know how to linearize this highly non linear functions
dTz = ((alfa_dispersione*U_dispersione)*(Tw-Tz) + (1/Ts)*IntGain*People + alpha*(Tr-Tz) )/C_z;
dTw = (alfa_dispersione*U_dispersione*(Tz-Tw)+alfa_dispersione*U_dispersione*(Text-Tw))/C_disp;
dTr = 1/(md_load*cp_water)*(Qhp + (1/0.75)*alpha*(Tz-Tr) );
where [Tw Tz Tr] are our state variables and [Text People Tz_ref Cf Tz_ref_fc T5]
Text = u{1};
People = u{2};
Tz_ref = u{3};
Cf = u{4};
Tz_ref_fc = u{5};
T5 = u{8};
and other parameters are described
COPQ3 = a+b*Text+c*T5+d*Cf+e*Text^2+n*T5^2+g*Cf^2+h*Text*T5+m*T5*Cf+l*Text*Cf;
Php = Pmax*Cf;
Qhp = Php*COPQ3;
a = -1.806e+06 ;
b = 1.988e+06 ;
alpha = a*(0.11*atan(10*((Tz_ref_fc-Tz)-100))) + b*(0.1*atan(20*((Tz_ref_fc-Tz)-0.32)+5.52));
0 个评论
回答(1 个)
Avni Agrawal
2023-9-22
I understand that you want to linearize a highly non-linear model.You can use the concept of small-signal linearization. This involves approximating the non-linear functions as linear functions around an operating point.
This can be achieved in 2 ways.
In-order to achieve that, you can refer to the following steps:
Step 1: calculate linearized equations around operating point.
Step 2: Define Operation point value based on your model
Step 3: Substitute the operating point values into the linearized equations using the subs function in-order to calculate co-efficients
Step 4: Calculate linearized co-efficients, which are then used to construct the state-space matrices (A, B, C, D) for the linearized model.
Step 5: Create the linear state-space model using in-built 'ss' function from MATLAB
Here is the code snippet for the reference:
% Define the symbolic variables
syms Tw Tz Tr Text People Tz_ref Cf Tz_ref_fc T5
% Define the symbolic parameters
syms alfa_dispersione U_dispersione Ts IntGain alpha C_z C_disp md_load cp_water Qhp
% Define the symbolic equations
dTz = ((alfa_dispersione*U_dispersione)*(Tw-Tz) + (1/Ts)*IntGain*People + alpha*(Tr-Tz) )/C_z;
dTw = (alfa_dispersione*U_dispersione*(Tz-Tw)+alfa_dispersione*U_dispersione*(Text-Tw))/C_disp;
dTr = 1/(md_load*cp_water)*(Qhp + (1/0.75)*alpha*(Tz-Tr));
% Linearize the equations around an operating point
operating_point = [Tw Tz Tr Text People Tz_ref Cf Tz_ref_fc T5];
linearized_eqns = jacobian([dTz; dTw; dTr], operating_point); % Compute the Jacobian matrix
% Evaluate the linearized equations at the operating point
linearized_eqns = subs(linearized_eqns, operating_point, operating_point_values); % Define the operating point values from your model
% Extract the coefficients of the linearized equations
linearized_coeffs = coeffs(linearized_eqns, [Tw Tz Tr]);
% Extract the state-space matrices
A = double(linearized_coeffs(1:3, 1:3));
B = double(linearized_coeffs(1:3, 4:end));
C = eye(3);
D = zeros(3, size(B, 2));
% Create the linearized state-space model
linear_sys = ss(A, B, C, D);
Resources which may help for further assistance:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!