Hi All,
I have been working on the basic simulation of an AOCS, and to do that I have been defining attitude laws and then switching them on specific events using event detectors and the attitudesSequencer class.
When the switch event occurs, it appears that there is some form of spike, as shown in AOCSspike1.png and AOCSspike2and3.png, which are from the AOCS software developed. In these images, the dark blue line shows when the event occurs, the other coloured lines represent the z component of the attitude using different transition times. If I had zoomed in further for spike1, it would show a linear angular shift of 180 degrees in 3 seconds, far beyond the capabilities of most AOCSs.
Looking at the spike at the end of the pass in
AOCSspike2and3.png, it becomes obvious that the spike is not a rapid shift back to the original curve, as immediately after the line begins to rise back towards the original shifted attitude. From there it later falls to rejoin the original pointing law.
My current working theory is that there is some kind of integrator failure between the two laws causing a large change in attitude, at which point the attitude law attempts to rectify the situation, however I am open to all other ideas.
As this is part of a large project, I copied and pasted the relevant code into a SSCCE and built a similar propagator to the one used in the project, and a similar thing can be seen in the second transition as shown in SSCCEspike. This SSCCE is included in the email in case this helps somehow. If the attachments are unavailable, they are included on github here:
https://github.com/TommyOC/SSCCEaocs.git
I would appreciate any suggestions as to the cause of these spikes and any potential solutions.
Kind regards,
--
Tom Walford
Software Engineer
Open Cosmos Ltd. | Company Registration no: 09704443 (England) | VAT Registered: 225 9566 81 | RAL Atlas Building R27 | Fermi Avenue | Harwell Campus | OX11 0QX | Oxfordshire | United Kingdom