My nonlinear system of field controlled DC motor contains two equations for each state variable.
One of these variables, namely x1 is unobservable. I have designed a State Feedback Integral Controller that uses the observable state x2 to calculate control input for the plant DCmotor. Following are the images of SIMULINK model.
Following is the SIMULINK model for DC motor described by two nonlinear state equations:
and the state-feedback integral controller:
After building the model I wrote an m-file to perform the simulation.
clear all close all clc
% Defining the parameters h = 0.001; % Sampling time [sec] final_time = 2; theta1 = 60; theta2 = 0.5; theta3 = 40; theta4 = 6; % Model variable theta5 = 40000; % Model variable ref_in = 2; % Reference signal input
% Specify initial values. These are also equilibrium points. y0 = ref_in; % Output guess u0 = (theta1*theta4*ref_in)/(theta3*theta5); % Control input guess x1_0 = theta3/theta1; % State x1 guess x2_0 = y0; % State x2 guess x0 = [x1_0 x2_0]'; % State vector
% Find equilibrium point % Keep x2 state fixed because this is the only observable state. Also keep % output fixed at the initial output which is the reference signal input. [x, u, y] = trim('DCmotor', x0, u0, y0, 2, , 1);
% Linearization about equilibirum point [A,B,C,D] = linmod('DCmotor', x, u);
% Pole Placement for stability p1 = -10 + 5i; p2 = -10 - 5i; K = place(A, B, [p1 p2]); k1 = K(1,1); k2 = K(1,2);
% Run the model sim('mot_ctrl');
After executing "trim" command, I got x = [0.6666;0.6666]'. Clearly this is not correct because I specified(in trim) that x0's 2nd state must remain same as reference input itself. So the 2nd value in x above should have been 2. Consequently linearize and place does not give correct result.
I hope someone can help me with this.
No products are associated with this question.