Phase Portrait

Wednesday, June 24, 2009

YouTube video of helicopter control project of a student

For anyone who doesn't understand what "control" is, the following is a small example of the work of a "control engineer". In this case, the engineer is one of my students. He's an undergraduate in a class I taught last quarter; this YouTube video is a demonstration of his final project for the class:
As shown, his controller manages to keep the helicopter stabilized in a position that gets set by the joystick. The computer "flies" the helicopter with a heading set by a human via joystick. When they push on the helicopter, they're simulating a disturbance like a heavy wind gust. The helicopter's controller quickly brings it back to its old state. What you don't see is that the controller has been designed to do this as smoothly as possible (e.g., to prevent "jerkiness" within the helicopter).

This is a concrete example of classical control design. What I do in particular in my own research is quite a bit different. However, the video is a nice demonstration about what "control engineers" (like me) do.

Labels: , , , , , ,

Tuesday, June 23, 2009

Something for fans of Douglas Adams

I am not a member of the Douglas Adams cult, nor do I foam at the mouth thinking about The Hitchhiker's Guide to the Galaxy; however, I do know several such junkies. I had an experience yesterday that I thought would interest them.

The following picture is taken from the floor of the bathroom down the hall from my office.
If you can't see it, then click on the large version of the image. To give an idea of scale, I think the little tag is one of those stickers indicating either the size of a jacket or the identity of a particular clothing inspector.

Labels: , , ,

Thursday, May 21, 2009

Just a Walk on the Beach? (by my brother)

My brother, who is presently suffering with ALS, just sent this. Please visit my d'Feet ALS walk web page and help us.
Just a Walk on the Beach?

I want you to think back, imagine in your mind, totally block all other thoughts out, just focus on what you are reading. Close your eyes to all your surroundings for just a few minutes.

Imagine, your walking along the beach and you see kids starting to bury the feet of a young persons with sand, packing it down, adding water to make it good and heavy so the feet can’t move. Can you see him? Standing with no movement in his feet? Can you? He can handle it right?

You continue down the sandy beach as the ocean waves continue to splash. You come upon another group of kids that have buried this young persons feet, calves, just above his knees. You watch as he concentrates on his balance a bit more. Can you see him? Have you ever lost your balance? Do you remember that feeling? Do you? Should you help yet?

You go down further and you come to another group burying a young persons feet, legs, waist and hands. Not only can he not move his feet and legs but now his hands won’t move right. All statuesque, unable to move can you see him? Can you? Ready yet?

As you’re reaching the end of the beach you see yet another group. Packing sand from his feet to his throat. As you look on you can see that he can’t walk, move his arms, struggling to breath from the weight of the sand. He can’t talk from the pressure on throat. You can now see the fear in his eyes of when will the tide come in. Can you see him? Can you? Have you asked how can help or just stand by and watch?

As you walk around the front of him looking in his fear filled eyes you realize that you recognize this young man. It’s your son! Are you ready to help yet? What will you do now? Are you too late?

DON’T WAIT TILL IT EFFECTS SOMEONE YOU LOVE, HELP NOW!!

Strike out ALS.

Ken Timmons
Again, please visit my d'Feet ALS walk web page and help us.

Thanks.

Labels: , , ,

Tuesday, May 19, 2009

My 2009 d'Feet ALS Walk Page

My brother Ken has ALS (Lou Gehrig's disease). Every year, our family participates in the ALS association's Columbus chapter's Walk to Defeat ALS, and this year is no different.

Please help us defeat ALS by visiting my 2009 d'Feet ALS walk page.

Thanks so much.

Labels: , , ,

Monday, May 18, 2009

"Please unsubscribe me..."

A mailing list at the university was recently created and added a large number of faculty, staff, and others to it automatically. An announcement went out to all of these subscribers (who didn't know the list was going to be created) giving information on the list (and why they were added) and details about subscribing/unsubscribing/etc. Of course, many of them did not want to be subscribed. Rather than following the clear instructions on how to unsubscribe, they started sending e-mails to the list.

(Some actually sent e-mails to the list ASKING TO BE SUBSCRIBED!!)

Here's a snapshot (from Google Mail, rendered with an ASCII art theme) of the hilarity that ensued... (where names have been obscured to protect the guilty... I mean... innocent)
Notice how some of those messages are threads that are 10 messages deep. Also notice that this isn't a pruned inbox. This is a snapshot of an inbox that has been destroyed by this mailing list.

Labels: , , , ,

Invisible Handjob

Evidently "Invisible Hand" is right up there with "Survival of the Fittest" as a phrase the "author" maybe only muttered once or twice and probably meant it as a joke and probably regretted it greatly after saying it.

Freakonomics blog: The Invisible Hand Hoax
Adam Smith’s “invisible hand” theory of efficient markets is one of the first lessons taught to young economics students. James Tobin, a Nobel prize-winning economist, once described the theory as "... one of the great ideas of history and one of the most influential." But in this new paper, Gavin Kennedy argues that Smith actually had no invisible-hand theory, pointing out that the phrase appears only three times in Smith’s writings. One scholar believes that Smith’s use of the phrase was a “mildly ironic joke.” (HT: Brad DeLong)
Referenced paper: "Adam Smith and the Invisible Hand: From Metaphor to Myth" by Gavin Kennedy (Econ Journal Watch, Volume 6, Number 2, May 2009, pp 239–263)

Labels: , , , , ,

Friday, April 24, 2009

Google code actually becomes useful! Supports a DVCS! MERCURIAL!

Google Code Blog: Mercurial support for Project Hosting on Google Code
We are happy to announce that Project Hosting on Google Code now supports the Mercurial version control system in addition to Subversion. This is being initially rolled out as a preview release to a few invited users on a per-project basis, so that we can iron out the kinks before making this available to the general public.


While there were several DVCSs that we could support, our decision to support Mercurial was based on two key reasons. The primary reason was to support our large base of existing Subversion users that want to use a distributed version control system. For these users we felt that Mercurial had the lowest barrier to adoption because of its similar command set, great documentation (including a great online book), and excellent tools such as Tortoise Hg. Second, given that Google Code's infrastructure is built for HTTP-based services, we found that Mercurial had the best protocol and performance characteristics for HTTP support. For more information, see our analysis.

Labels: , , , , , , , , ,

Thursday, April 23, 2009

Warning: Quanser flexible joint uses different angle convention than motor

Quanser Academic makes a line of products, which you can see demo'd at their YouTube channel, that are sold to university laboratories as teaching aids for control theory. Today I noticed a funny undocumented quirk about one of those products. I have notified Quanser of this, and there is some indication that they will update their documentation to reflect this quirk. However, because their documentation is not on-line, it's hard to see how that update will ever reach people who have already bought these products.

I TA a graduate control lab, and today's lab had the students design and implement an LQR controller that made use of a full-state observer to control Quanser's flexible joint. The motor angle is measured by a shaft encoder (which is the output we use to drive our observer), and the arm angle is measured by another encoder. We don't need the measured arm angle because we're using a full-state observer, but we still capture it for comparison to our estimated arm angle.

The students build a controller that stabilizes the plant to a moving equilibrium that tracks a square wave. At every transition, the observer trajectories had some peaky transients, as is expected, but it appeared like they were always in the wrong direction for the arm angle and its speed. I dismissed this as peaking, but one group wanted to investigate further, and so I had them track a sine wave instead. What did we find? The arm angle and speed estimates were always EXACTLY 180 degrees out of phase with the measurements.

I was shocked, and so I looked into it. Visually, I could tell that the FLEXIBLE JOINT's ANGLE ENCODER is mounted UPSIDE DOWN with respect to the motor's angle encoder. That means that rotating the motor to the "right" produces a positive angle even though rotating the JOINT to the right produces a NEGATIVE angle! The observer had it right; it was the MEASUREMENTS that were incorrect! (I built a minimal example to test my hypothesis, and what I say matched what I observed; the opposing rotations lead to equal signs)

Nowhere is this documented. Because this angle is not directly driven (it's coupled to the assembly via springs) and the arm+spring system is naturally stable and fast, this POSITIVE FEEDBACK doesn't lead to destabilize the system unless you have extremely high gain. So I'm guessing no one ever noticed. Multiplying the measurement by -1 restored intuition. I drilled down into some Quanser demo code, and I found that they do the same thing in their controllers. I have no idea why they would not document this in their rotary joint docs. Do they expect everyone to go through all of their MATLAB and Simulink code?

I could understand this error if the flexible joint was a generic component made by a different company, but the joint is solely for the purpose of connecting to the motor, and so it would make sense that its encoder orientation would match the motor encoder orientation! At the moment, we need different gains for both.

Labels: , , , , , ,

Friday, April 10, 2009

Copying lyrics from Pandora to your clipboard

You may have noticed that Pandora gives you (everyone? just subscribers?) the ability to view the lyrics of songs. For example, when I view "Not Going Anywhere" by Keren Ann, it gives me the full lyrics for the song (note: not every song has its lyrics in the Pandora database).

Pandora has been clever about how they display the lyrics. They actually don't come down with the page. The page uses AJAX to download the lyrics after you download the page. It then populates the correct place on the page with the lyrics. It also changes the mouseover properties so that you cannot use your browser to highlight those lyrics. Because the lyrics are populated dynamically, saving the page doesn't work either.

Well, I thought that was lousy. If the lyrics are displayed in plaintext on my browser, I should be able to at least highlight them. If they really wanted to prevent me from doing that, they'd build a GIF/JPG/PNG on their end and send me the lyrics in that, right?

So I figured out that I could use Firebug, the Firefox add-on, to do what Pandora didn't want me to do.
  1. Start Firebug.
  2. Start the "Console."
  3. Use the pull-down menu on the "Console" tab to "enable" the Console.
  4. Issue the JavaScript command
    alert(fullLyrics.innerHTML)
    on the console.
  5. A dialog box should pop up with the lyrics. Use your mouse to copy them to your clipboard.
  6. You can then disable the Firebug console using that same pull-down menu.
That worked for me. It should work until they change the names within the JavaScript.

Labels: , , , , , ,

Saturday, March 21, 2009

rspublic.cls fixed to get rid of nasty Incomplete \if errors

Depending on how updated your LaTeX distribution is, if you try to use the Royal Society's rspublic.cls to build your compuscript, you may get nasty incomprehensible errors like:
! Incomplete \if; all text was ignored after line 7.

\fi
I didn't get these errors on my home system (which has TeX Live 2007 installed), but I got them on Manuscript Central for Proc. R. Soc. B, and that's a major problem.

After two days of binary searching through possible sources of the problem, I found it. Jonathan Wainwright (the author of the document class) used a \phantom in both the \@oddhead and \@evenhead without preceding it by a \protect. The \phantom macro is fragile, which means that it can cause major problems when put in contexts that move around (like headers). So it needs to be protected.

I added \protect in front of each of the two \phantom calls, and all was well in the world.

I've posted a fixed version of the document class at:Give it a shot. That version also allows for 11pt and 12pt fonts, and it defines \@ptsize, which setspace needs to exist in order to work (i.e., for double spacing).

Labels: , , , , , , , , , , , , ,


 
appalling
appalling
appalling
appalling appalling
appalling
appalling
appalling