Wednesday 29 February 2012

LAB 4: PID Controller

This lab has been completed by 'Huan Li' and 'Aidin Mirsaeidi'

1. What is the difference between polling and clocked I/O? What does it matter?

Polling: CPU would wait until the routine currently being executed is finished, then goes on to the next routine. Simply it's a busy wait.
Clocked: CPU can do some other task and branch to some other routine whenever some interrupt comes

2. Making a PID Controller:

Using the code modification steps provided along with the PID Library, the video below demonstrates the controller we built using the Twiddler. This controller ensures the encoder goes back to the 'zero' position in response to a user's step input.

http://www.youtube.com/watch?v=v_ByKu7ZRXw&feature=player_embedded

3. Virtual spring on Twiddler

We can compile and run the sample code provided in Twiddlerino_EncoderPoll.ino, we can observe that the spring is unstable and needs a more robust control

4. Implement a virtual wall

In this video, we can see that Tcmd becomes zero if the rotation is not in the direction to the wall, and hence there is no spring affect.

5. Now we impelement this as a PID controller:

http://www.youtube.com/watch?feature=player_embedded&v=v_ByKu7ZRXw

The key to formulating an appropriate conrol law is to experimentally find appropriate gain constants, Kp, Ki and Kd. We tune one parameter at a time to find the effective gain constants.

6. Increasing the sample rate does not have much effect, however reducing the rate would result in instability since the feedback is much delayed and the system lags.

Wednesday 15 February 2012

CPSC 543: Project, 1st Iteration

Scenario:

Megan owns many different kinds of plants in her home and she is very careful to treat her plants with care. On a typical day, she gets home and she is planning to run some errands: message a couple friends, clean the kitchen, cook dinner, etc.

For some reason, she is not too worried about her flowers...Because in the back of her mind, she can hear her flowers breathing. Not too while ago, she purchased a central haptic device through which she can feel her flowers and ensure their well-being. This device allows Megan to have that peace of mind and check up on her flowers in a non-impulsive/distracting way. Because again, she knows 'she can communicate with them'. Through this device, Megan can hear her plants' breathing, see how warm or cold they are and also assess the plant's mood based on their aliveness. Megan has complete control over her plants' well-being.....



-------------------------------------------------------------------------------------------------

The design space is vast:

What emotions are critical in communicating plants
' well-being to owners?

How do we produce those emotions through haptic sketches
?

How can we measure the
'delight' factor based on users' feedback?

What are the implications if we combine touch with other modalities such as auditory and vision
?

Why not ONLY auditory and
/or vision?


So far, we have made two sketches to explor the design space and test the feasibility of our idea:


Sketch #1: Producing a breathing pattern


In this sketch, we tried to communicate to user the plant
' breathing pattern which we did in lab 4. Here is the link to our lab 4 blog in which there is the Youtube link to our demo:

http://aidin-cpsc543.blogspot.com/2012/02/lab-3-haptic-communication.html

Sketch #2: Producing a vibration affect

In this sketch, we aim to communicate the plant's mood based on varying the frequency of the vibration. If the plant is 'sad' and not doing well, the vibrations will be infrequent whereas if the plant is feeling happy and alive, there will be high-frequency vibrations. Here is the video to demonstrate this idea:

https://www.youtube.com/watch?v=MDmG2vI6oIc

What
' next??

To build more sketches and inquire about the questions mentioned above :)