Out: Wednesday, October 30
Due: Wednesday, November 6
Signal conditioning is a term for all the ad-hoc processing techniques (read: hacks) engineers do to try to remove noise from the signals in their systems. Here we assume that the readings we get on a wire are some kind of a combination of a "signal" (what we're really trying to measure) and some "noise" (some other extraneous data). (Note that there is an unfortunate confusion of terminology: up to this point, we have called the wire itself the signal). Sometime the combination process involves adding the signal and noise together, sometimes it involves occasionally replacing the signal with the noise, and often it is more complicated. In any case, signal conditioning classically means trying to remove the noise and leave the signal.
For this assignment, we'll interpret the term more broadly here to mean "hacks you do to broken signals (in the wire sense) to make them work better." The GRL library has a large number of specialized operators for signal conditioning. For this assignment, you should read the documentation on the GRL library and use the operators in it to solve the following problems. Note that:
xof the sensor, give a GRL expression for a signal in which the noise is removed, or rather greatly reduced.
Again, write a GRL expression that will remove the noise, or rather, greatly diminish it.
Sporadic noise in a piecewise-constant signal
Suppose you are running in an office building with corridors of various widths and you want to determine whether the robot is in a wide corridor or a narrow one. You could use
(+ left-distance right distance)
as a rough-and-ready measure of corridor width.. The problem is that
if there are objects in the hallway, open doors, etc. you'll hallucinate
that you're in a different-sized corridor. Unlike the shot noise
above, you can't assume that the errors last for only one clock tick.
On the other hand, you know that the signal you're looking for is
piecewise-constant: it stays the same for a long periods of time and only
makes changes when you move from one corridor to another. Write an
expression that will remove the noise caused by open doors and objects in
the hallway from the width signal.
(behavior (and (< center-distance threshold)
(< (abs (- left-distance right-distance))
So basically, the robot just sits there and thrashes. This is a
common failure mode with unwedgers. Propose an alteration to
(< center-distance threshold)that will solve the problem. You may not use
(rt-vector (* target-direction gain)
(* target-direction gain))
(> left-distance threshold))
(count door? #f))
left-distanceis assumed to be the amount of freespace on the left side of the screen as in the freespace follower. This will work when the robot is driving down a corridor and is aligned with the axis of the corridor (i.e. facing the end of the corridor). When that happens, we should get small readings for
positionsignal should tell us the number of doors we've passed so far. Unfortunately, this doesn't work. When you try the code, the robot gets to the first door and suddenly
positionis a huge number like 300. Explain the problem and give a fix.
(> left-distance threshold)))
aligned?is true whenever the robot is aligned with the corridor. Write a definition for
aligned?to try to guess when the robot is driving straight along the corridor. Assume there is a signal,
rotational-velocity, that tells you how the robot is turning.
door?signal to trigger a 90 degree ballistic turn. But if we do that, the robot ends up pointing at the wall because it turns too early:
turn-now!, that causes the robot to turn at the right time.
(> left-distance threshold)
(< left-distance threshold2)))
- Modify the definition above so that the system won't mistake big doors for little doors.
- Give an example of how your system can still be fooled (mistake a big door for a little door or miss a little door entirely) if there is a person around.
true-time) to make sure it's true for a reasonable period of time before believing it. For example, suppose we want to determine whether we're in a part of the building that has a dark carpet rather than a light carpet using a signal,
center-brightness, that gives us the image intensity of the center pixel of the image (not that you'd really want to do it this way...)
(define-signal dark-area? (< center-brightness threshold))
(< (true-time (< center-brightness threshold))
true-distance, that's just like true time except that it reports the distance over which its input has been true. Assume you have available a signal,
translational-velocity, that reports the robot's present speed. Do not worry about whether the robot is moving in a straight line.
Propose a design for a freespace follower that will "learn" the right gains (or other parameters) to let it follow the corridor as fast as possible without oscillating.
Send your assignments to Aaron <email@example.com> via email by 2:00pm Wednesday November 6 (i.e. class time). Papers received after that will be counted as late.