Monday, September 19, 2016

Real-Time Plots with Python -- Bookend

In the past series of posts I focused on using Matlibplot and Python to generate plots.  While the value of plots is not revolutionary, the ease of generating plots with Python and this library makes it worthwhile holstering in 'Ye, Ole Engineering Toolbox'.

I had the sincere opportunity of working with a talented controls engineering department early in my career and acquired a number of life-long experiences.  One of the most significant of which was seeing the significant value in live plotting as an integration and debugging tool.  With dozens of servo controllers, coordinated by multiple sequencers made for a sophisticated system and GDB simply wouldn't cut it for debugging purposes.  Enter 'Simplot', the plotting utility for Matlab, which with relative ease allowed plotting the sequencer state engine as well as the multitude of controller commands and responses.  As the turret moved it wasn't uncommon for the inertia to vibrate or bump a motion controller out of position and stall out the sequencer.  Rendering real-time plots would demonstrate such scenarios with ease and expedite the debugging and iterative development process and made engineering marvels like this a reality:


I took the liberty of simulating the type of plots used, demonstrated in the following video.  



If interested, the Python simulation and plotting is available for your amusement as well.

The plotting however is as easy as the past posts demonstrated.

Cheers.

No comments:

Post a Comment