Useless Robotics

This may be old news to some, but an inventor has gotten quite alot of attention lately. No, I’m not talking about Elon Musk or the team behind the latest iPhone. The inventor in question is Simone Giertz, who has what may be the funniest job at the moment. In a previous newsletter, there was a video on failed robotics which was much appreciated. Simone Giertz’ robots mostly seem to work as intended – they are just useless.She decided that the focus shouldn’t be on usability, but to have fun! I for one think she’s on to something and that her approach is far more likely to inspire people to actually start programming and constructing robots than more serious/advanced projects. 

tumblr_inline_nzgnlyjfqh1s3yuca_500
Chopping Robot. Photo from simonegiertz.com.

You can find her on YouTube but I recommend checking out her blog as well, where she sometimes posts more lengthy descriptions of her inventions. In particular, have a look at the chopping robot!

 

 

Annonser

Electrical Circuit example – a comparison

The electrical circuit has been a recurring example for the demonstration of OpenModelica in the previous newsletters. There are vast topics to address to get a complete understanding of the software, which is beyond the scope of these newsletters. However, to round off the exemple series, let’s compare the implementation in OpenModelica to that in Simulink!

circuitExample_Modelica

The OpenModelica model was easily constructed using predefined library blocks, see picture below. With Simulink, using ODEs instead of the DAEs of OpenModelica, the model would vary depending on its usage. Let’s assume the capacitor voltage is of interest. The equations to be implemented are:

\frac{d}{dt}x = \frac{u-x}{RC}

electricalCircuit_simulinkThe resulting Simulink model can be seen below. Both OpenModelica and Simulink support a variety of solvers, and some of them use the same numerical methods. For this simulation, OpenModelica is configured to use ‘rungekutta’ while the Simulink model is using ‘ode45’. Both are based on the Runge-Kutta method, the only difference I’ve found is that OpenModelica uses a fourth order Runge-Kutta, while the version in Simulink is fifth order – they should yield very similar results. When running the simulation in OpenModelica, an output .mat-file can be generated automatically and then imported into Matlab, making it easy to compare the simulation results. As can be seen from the plot below, the results are almost identical for the simulations in Simulink and OpenModelica. Only the step sizes varies somewhat, which is fine for this example.

capacitorVoltage

So, not only was the electrical circuit easy to model in OpenModelica, with several benefits along the way. It also generates a near identical output when simulating the model, which of course is the most important part!

 

Control-letter #3

Bode’s Relations and Minimum Phase

If you have plot a Bode-plot, maybe you have noticed that there is a relation between the phase and change of magnitude in the plot. This relation is called Bode’s relation. For the differentiator the slope is +1 and the phase is a constant pi/2. For the integrator the slope is -1 and the phase is -pi/2.
For the first order system G(s)=\frac{1}{s+a} the amplitude curve has the slope 0 for small frequencies and -1 for high frequencies..

Bode investigated the relations between the curves for systems with no poles
and zeros in the right half-plane. These systems are called minimal phase systems. He found that the phase was uniquely given by

\mathrm{arg} G(i\omega_0) =\frac{\pi}{2} \int_0^\infty f(\omega)\frac{d \mathrm{log}|G(i\omega)|}{d \mathrm{log}\omega}d \mathrm{log}\omega \approx \frac{\pi}{2} \frac{d \mathrm{log} |G(i\omega)|}{d \mathrm{log} \omega} \mathrm{and} f(\omega)=\frac{2}{\pi^2} \mathrm{log}|\frac{\omega+\omega_0}{\omega-\omega_0}|

 

The interpretation is that the phase curve above is determined by the derivative of the gain curve, see the plot for lead and lag filters.

LeadLag

Non-minimum phase system does not have this property and are regarded as more difficult to control.

 

MEMS and buzzwords…

The buzzword for some time have been Internet of Things which is driving demand and growth for MEMS devices. The trend is that the devises become smaller and smaller at an impressive rate. But, in the case of accelerometers, the noise level is inversely proportional to the mass, see this.

One of the fastest growing domains for MEMS is the industrial with applications as machine health and shock sensing. One interesting application is non-destructive testing.