unable to create state space observer


2 Commenti
Hi @Abdul Hamzah,
After going through your comments,the code you provided for implementing a state-space observer appears to be fundamentally sound; however, there are a few areas to check that may be causing the unexpected output graph.
Observer Gain Matrix (L_mat): Ensure that the poles specified in the op variable are appropriate for your system dynamics. If the poles are too far from the origin, the observer may not converge properly.
State-Space Representation: Verify that the matrices A_new, B_new, C_new, and D_new are correctly defined. The observer's dynamics should be stable, and the dimensions of these matrices must align with the state-space model.
Simulink Model Configuration: Check the configuration of your Simulink model. Ensure that the input signals are correctly connected and that the simulation parameters (like time step and solver) are set appropriately.
Initial Conditions: If the initial conditions for the states are not set correctly, it may lead to unexpected behavior in the output.
Graph Settings: Lastly, ensure that the graph settings in Simulink are configured to display the desired outputs. Sometimes, the wrong signals may be plotted.
By addressing these points, you should be able to identify the issue and achieve the expected results from your state-space observer.
If problems persist, consider simplifying the model to isolate the issue further.
Hope this helps.
Risposte (1)
0 voti
Hi @Abdul Hamzah,
After going through your comments,the code you provided for implementing a state-space observer appears to be fundamentally sound; however, there are a few areas to check that may be causing the unexpected output graph.
Observer Gain Matrix (L_mat): Ensure that the poles specified in the op variable are appropriate for your system dynamics. If the poles are too far from the origin, the observer may not converge properly.
State-Space Representation: Verify that the matrices A_new, B_new, C_new, and D_new are correctly defined. The observer's dynamics should be stable, and the dimensions of these matrices must align with the state-space model.
Simulink Model Configuration: Check the configuration of your Simulink model. Ensure that the input signals are correctly connected and that the simulation parameters (like time step and solver) are set appropriately.
Initial Conditions: If the initial conditions for the states are not set correctly, it may lead to unexpected behavior in the output.
Graph Settings: Lastly, ensure that the graph settings in Simulink are configured to display the desired outputs. Sometimes, the wrong signals may be plotted.
By addressing these points, you should be able to identify the issue and achieve the expected results from your state-space observer.
If problems persist, consider simplifying the model to isolate the issue further.
Hope this helps.
4 Commenti
Hi @Abdul Hamzah,
You asked, “how about the simulink side? is there any problem on it too?”
I was tired from work. If I was going to design state space observer in Simulink, I will implement the following blocks.
State-Space Block: This will represent your system dynamics. Gain Block: To scale the output of the observer.
Sum Block: To compute the difference between the actual output and the estimated output.
Integrator Block: To integrate the state error.
Configure the State-Space Block: Double-click the State-Space block and enter the system matrices (A, B, C, D) that define your state-space representation.
Connect the Blocks: Connect the blocks appropriately:
The output of the State-Space block goes to the Sum block.
The output of the Sum block feeds into the Gain block.
The output of the Gain block is then integrated to update the state estimate.
Display Results: Use a Scope Block or Display Block to visualize the estimated states. Connect it to the output of the Integrator block.
Run the Simulation: Set the simulation parameters and run the model to observe the results.
So, in your simulink model I don’t see “integrator block”.
https://www.mathworks.com/help/simulink/slref/integrator.html
Also, @Sam Chak provided comments as well.
Hope this helps.
Hope this helps.
Categorie
Scopri di più su General Applications in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
