Strange simulink error. Professor & TA don't know. Any Ideas?
I am currently working on developing a simulation for a restricted UAV, and I’m having some issues with Simulink while doing this. I have my mathematical equations which have been approved by my professor, but while I’m trying to simulate the system I am running into strange issues. Moreover, neither my professor nor my TA can figure out what is causing this issue, despite multiple private sessions to troubleshoot. If anyone can shed some light on the issue it would be highly appreciated.
Firstly, the equation I’ve modeled on Simulink is this:
My Simulink block diagram is above. Input 1 Is Fb+Ff which, in this scenario = 6.8. Input 2 is theta which = 0.
I have annotated the values that should be and are at each of the nodes before the summing junction. 394
In this section of the block diagram the theoretical value and the simulation agree.
The problem comes in the more complex half of the diagram. The graph I am validating should look like this.
There is an initial rise and then oscillations about a non-zero number. Obviously, my graph will be ideal so oscillations will not persist like they do in the graph above. My final graph is this…
Where the y-axis is elevation angle in degrees and the x-axis is in seconds. Obviously these two graphs are in no way similar. In an attempt to analyze where I could have made an error in my block diagram, I analyzed the behavior at each node.
Immediately after the cos block to the lower right I get oscillating behavior
Immediately after the summing junction and gain (1/0.91) I get:
The above bears a resemblance to the graph I’m validating against.
After the first integrator, however, I get this.
Adding the two graphs together, should I not be getting a graph that rises and then oscillates about a non-zero number?
Have I made a mistake in my block diagram somewhere?
The only value I’m allowed to change is the gain marked De.
At this point I am starting to hit a wall and really need some insight on this. Surely this cant be something wrong with the Simulink source code.
Nothing I do gets me anywhere near the validation graph. Can someone please point me in the right direction or let me know if you see any errors?
Any insight is highly appreciated, thank you for reading.
Should you want to view the Simulink file for further analysis, it is available for download here: https://ufile.io/08aqv However please note that the attached file is my entire Simulink project. The circuit reference in the question above is contained in the subsystem "elevation". 563