July 5, 2008 by Bondhan Novandy
SMC is one of the robust controller with ability to compensate the uncertain parameters, incomplete dynamics model and to reject disturbances. The additional of PI on the SMC gives several “extra” freedoms and flexibility in tuning and obtaining the desired performance.
Design scheme:
First, select a PI sliding surface. Second, from the sliding surface we derive the equivalent control. Third, the control output is achieved by adding the switching control output. The mathematics derivation is straight forward.
Here is an experiment of position control using Proportional sliding mode control of a BLDC motor. Continue Reading »
Posted in Control Theory, LabView | No Comments »
March 20, 2008 by Bondhan Novandy
A basic switching circuit that I must remember:

~fiuhh at last 
Posted in Circuit | No Comments »
February 3, 2008 by Bondhan Novandy
Any of you who is using EPOS from MAXON motor and LabVIEW Real-Time might facing the same problem with me. The RS232 -IMHO- is not fast enough to achieve real-time communication between the EPOS and RT controller, also I am using the LV-RT for the main program, thus it will be difficult to synchronize between two LVs program from two different computers which mainly caused by the communication overhead. The problem got worse when I knew that we could not download the EPOS dll file onto the RT. After getting my answer from NI forum, I decided to use the CAN Protocol which can reach up to 1Mbps.

For the first trial, we have the IXXAT CAN-USB device. The question is, how to interface USB device to the RT? Because if I use this device, then it will be RT <-> USB <-> CAN, which means that I need a driver for IXXAT CAN-USB for the RT! I emailed the IXXAT company, the engineer replied that they do not support the LV-RT. Anyway I successfully send command through CANOpen with this device on Windows platform, but Continue Reading »
Posted in Communication, LabView, Programming | 12 Comments »
December 14, 2007 by Bondhan Novandy
Sliding mode control is one of the robust control which can handle known uncertainties. It works by forcing the output state trajectory of the system towards our predefined sliding surface, so that it will slide on our surface in subsequent time. You can download the presentation file here, the title is “Simulation and Implementation of Servo Motor Control with Sliding Mode Control (SMC) using Matlab and Labview”.
The Matlab file will not be shared, I think the simulation is not difficult you can write in S-Function or by calling ODE solver from m-file. LabView source code can be seen (seeing source code or reading it :D) in the presentation file. I hope It is useful for the sake of education, sharing knowledge to the world -at least this is what I can do for now :(, hope I could give something useful to human being before I die-. Btw, if there’s something wrong with the equation please let me know. Oh and..don’t expect too much from the presentation file, I only did this less than 2 weeks, plus I am new to LabView and Matlab S-Function T_T.
After the encoder is installed to the motor I will post the video here, insyaAllah. Hope It will not take too much time for the experiment.
Updated 2008-05-07:
I did the experiment last february 2008, just able to upload it now caused by my laziness :D. I forgot to add in the presentation file, the inverter input is only positive DAC value from 0 to 10 V. Thus, if the control output is negative you need to make additional circuit to switch the direction (from forward to reverse, vice versa). (Look at my posting about the “Basic Switching Circuit”), also for safety you must add switches and hardwired to the inverter. Here are the setup and the video: Continue Reading »
Posted in Control Theory, LabView | 4 Comments »
November 22, 2007 by Bondhan Novandy
Another basic article. My first time with LabView Real-Time. I decided to write a program to control an R/C servo motor with LV-RT. With PXI-7358, I decided to use the digital I/O, just by turning on and off the port according to the time constraint. I did not read the manual in detail, so I am afraid I missed something, but when I did a test how long the time took for turning the digital port from on to off was around 1.5 ms, and from on to off took 250 uS. It means that it is not possible to drive the R/C servo with digital I/O when the pulse needed should be between 200-2500 uS.
Here’s the code when I did a measurement on the time of digital I/O switching on-off: Continue Reading »
Posted in LabView, Programming | Tagged LabView Real-Time, RC Servo | 3 Comments »
November 4, 2007 by Bondhan Novandy
Again, still LabVIEW beginner.
I am currently reading an ebook titled “LabVIEW based Advanced Instrumentation System” by S. Sumanthi and P. Surekha, and IMHO this is a good book for beginner. I wish I could finish reading this book as soon as possible, because time is what I do not have
Two days ago, I tried to control a stepper motor with ULN2803 and LabVIEW. FYI -again- I am new to LabVIEW, so don’t expect too much from this article. I have NI-PCI 6221 and NI-PXI 7358 with me, the later is specifically manufactured for motion controller but still it has the digital I/O. And in this article I am using the motion controller digital I/O to control the stepper, if you only have DAQmx you also still can use it to drive your stepper motor, because to control stepper motor only need digital output which you can generate from your DAQmx.
Here’s the LV source code:
Continue Reading »
Posted in LabView, Programming | Tagged LabView, Stepper Motor, ULN2803 | 4 Comments »
October 16, 2007 by Bondhan Novandy
Yesterday, I tried to control a stepper motor using the L297 IC driver, but then I realized that I need another IC which could drive high current to the motor, similar to darlington transistor arrays. The ICs are being purchased at the moment for the need of lab experiment taught by my friend.
Oh well, I decided to learn how to generate a simple PWM in PCI-6221 on LabView -as you know I am always new in this, too many functions available, and I am not used to graphical programming-.
I utilized the counter 0 (DevX/ctr0) to turn on a LED (light emitting diode) that it will flicker according to the signal given. For this card the LED is located on PFI 12 (pin number 2).
Here is the front panel, where user can interact with the program: Continue Reading »
Posted in LabView, Programming | Tagged Graphical Programming, LabView, PWM | 3 Comments »
October 5, 2007 by Bondhan Novandy
I am writing this while waiting for my “Robot Analysis” class at 11 am. Any of you who has basic knowledge about robotics, especially the kinematics must has ever heard the word Denavit-Hartenberg transformation. Well, I am not going to write about this method, but the other method which was AFAIK found the latest around 1971, if I am not mistaken.
I am not going to explain the whole theory, I will just show you the homework and Matlab program that I wrote for this transformation type. In Screw transformation, the reference and final point is arbitrarily chosen, this makes this method different to DH method.
Ok. Here’s the question:

Here’s the answer: Continue Reading »
Posted in Robotics | 2 Comments »
September 25, 2007 by Bondhan Novandy
AFAIK, NI provides three ways of programming for the instruments they produce, they are:
- LabView, a graphical based programming
- LabWindows/CVI, a GUI programming based on C language
- Object Oriented Programming based language (C++, I am using MSVS2005)
You can see my desktop of these 3 “programming style:” Continue Reading »
Posted in LabView, Programming | No Comments »
September 10, 2007 by Bondhan Novandy
Old memory, I learned assembly first time when I were in Senior High School, 2nd grade. I learned how to write a .com program using debug. And now, after several struggle I managed to dig in my brain and wrote the tiny program
C:\>DEBUG
-A 100
0B32:0100 MOV AH,02
0B32:0102 MOV DL,41
0B32:0104 MOV CL,1A
0B32:0106 INT 21
0B32:0108 INC DL
0B32:010A LOOP 106
0B32:010C INT 20H
0B32:010E
-RCX
CX 0000
:E
-N C:\ABC.COM
-W
Writing 0000E bytes
-G
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Program terminated normally
-Q
C:\>DIR ABC.COM
Volume in drive C is WINDOWS
Volume Serial Number is C012-9F20
Directory of C:\
09/10/2007 06:12 PM 14 ABC.COM
1 File(s) 14 bytes
0 Dir(s) 11,225,669,632 bytes free
C:\>ABC
ABCDEFGHIJKLMNOPQRSTUVWXYZ
C:\>
I cannot remember which service interrupt used to put a single character into screen, well, here’s the reference:
Category: DOS kernel
INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
AH = 02h
DL = character to write
Return: AL = last character output (despite the official docs which state
nothing is returned) (at least DOS 2.1-7.0)
Notes: ^C/^Break are checked, and INT 23 executed if pressed
standard output is always the screen under DOS 1.x, but may be
redirected under DOS 2+
the last character output will be the character in DL unless DL=09h
on entry, in which case AL=20h as tabs are expanded to blanks
if standard output is redirected to a file, no error checks (write-
protected, full media, etc.) are performed
SeeAlso: AH=06h,AH=09h
~Still remembering the first time I cracked a commercial software =P, lol, it was fun. Thx for the tutorial writer, sorry I forgot your name =D
Posted in Personal, Programming | No Comments »