I am going through and reviewing this unprofessional (I highlight a potential mistake in Section3.4) paper: Nonlinear Model & Controller Design for Magnetic Levitation System
Specifically, I am trying to compare the responses of the linear and non-linear model in Simulink, using the parameters provided in Table 1 of that same paper. I am to comment on any discrepancies.
I am having trouble comparing responses, since they are totally different from each other.I suspect that I may have a mistake/misunderstanding when it comes to plotting the non-linear model. A very brief summary of the paper follows.
Non-Linear Vector Format
Comparing Responses - Working
For the non-linear model I used a MATLAB function block, with the following script:
function y = fcn(u) % define your constants g = 9.81; m = 0.05; R = 1; L = 0.01; C = 0.0001; x1 = 0.012; x2 = 0; x3 = 0.84; % nonlinear set of equations x = [x2; g-((C/m)*(x3/x1)^2); -((R/L)*x3 + (((2*C)/L)*(((x2*x3)/((x1)^2)))))] + [0;0;1/L]*u; y = x';
I then gave a step input to the system and got the following result. Yellow is the step input, green is the output.
Next, I proceeded with the linear model. I placed the matrices
D inside a state space block.
To get the numbers you see above, I replaced the constants with the parameters given in the paper. I got the following output.
As can be seen, both responses are completely different, and I am unsure about what discrepancies I should comment about. Are my non-linear and linear model implementations correct? I can add further details or workings if required.
Any help would be appreciated.