Method and apparatus for controlling panning/tilting motor of monitoring camera
View Patent ↗A method and apparatus for controlling a panning/tilting motor of a monitoring camera is disclosed. The position or speed of the motor is controlled based on the output of a hall sensor built in the motor without any position detection device such as encoder, so that the closed loop control of the panning/tilting motor is accurately performed, and the position coordinate of the panning/tilting motor is not distorted when the motor is out of step.
1. An apparatus for controlling a panning/tilting motor of a monitoring camera, comprising a control unit for controlling a position or speed of the panning/tilting motor using an output of a hall sensor provided in the motor, the control unit comprising
a motor angle calculation unit for calculating an actual angle of the motor based on data outputted from the hall sensor; and
a panning/tilting position coordinate calculation unit for calculating an actual position of the panning/tilting motor based on the angle of the motor calculated by the motor angle calculation unit;
wherein the actual position of the panning/tilting motor is calculated as follows:
actual position=(elec_rev*360 degrees+actual angle of motor); and
wherein the elec_rev represents a value of electronic rotation of the motor COUNTER.
2. The apparatus as claimed in claim 1 , wherein the motor comprises multiple hall sensors, and further comprising a hall amplifier having an analog-to-digital (A/D) port to amplify 3-phase output voltages received from the hall sensors, and wherein the motor angle calculation unit receives an output waveform of the hall amplifier which modulates 3-phase output voltages of respective motor hall sensors of the panning/tilting motor with the same amplitude and offset through its A/D port when the panning/tilting motor rotates, and the motor angle calculation unit scans the voltages for a specified period of time to calculate the actual angle of the motor for each scanning operation.
3. The apparatus as claimed in claim 1 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that, if the actual angle is larger than the previous angle, the direction of the motor is determined as clockwise, and the electronic revolution of the panning/tilting motor COUNTER(elec_rev) is increased by 1, while if a value of the increased electronic revolution COUNTER(elec_rev) is larger than a value which is obtained by multiplying the number of poles of the motor by a gear ratio, the value of the increased electronic revolution COUNTER(elec_rev) is substituted by elec_rev =elec_rev−(the number of poles of the motor*gear ratio).
4. The apparatus as claimed in claim 1 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that, if the actual angle is smaller than the previous angle, the direction of the motor is determined as counterclockwise, and the electronic revolution of the panning/tilting motor COUNTER(elec_rev) is decreased by 1, while if a value of the decreased electronic revolution COUNTER(elec_rev) is smaller than 0, the value of the electronic revolution COUNTER(elec_rev) is substituted by elec_rev =elec_rev+(the number of poles of the motor*gear ratio).
5. The apparatus as claimed in claim 1 , further comprising a proportional integral (PI) position control unit for controlling position or speed so that a predetermined target position coordinate of the panning/tilting motor is compared with the actual position coordinate of the panning/tilting motor calculated by the position coordinate calculation unit and, if the target position coordinate of the of the panning/tilting motor is different from the actual position coordinate, the panning/tilting motor moves as far as the difference to reach the target position.
6. An apparatus for controlling a panning/tilting motor of a monitoring camera, comprising:
a brushless direct current (BLDC) motor having a hall sensor;
a control unit;
a hall amplifier for modulating an output voltage of the hall sensor into a value that can be calculated in the control unit by amplitude-modulating the output voltage of the hall sensor with the same amplitude and offset, the control unit outputting a PWM pulse to drive the BLDC motor and receiving the voltage of the hall sensor outputted from the hall amplifier to control a position or speed of the panning/tilting motor; and
a 3-phase motor driver for modulating the PWM pulse from the control unit to apply 3-phase sine-wave current to the BLDC motor;
wherein the position or speed of the panning/tilting motor is controlled by only the output of the hall sensor provided in the motor;
wherein the control unit comprises a motor angle calculation for calculating an actual angle of the motor based on data outputted from the hall sensor; and
a panning/tilting position coordinate calculation unit for calculating an actual position of the panning/tilting motor based on the angle of the motor calculated by the motor angle calculation unit; and
the actual position of the panning/tilting motor is calculated as follows:
actual position=(elec_rev*360 degrees+actual angle of motor); and
wherein the elec_rev represents a value of electronic revolution of the motor COUNTER.
7. The apparatus as claimed in claim 6 , wherein the motor angle calculation unit receives an output waveform from the hall amplifier at an A/D port, and scans the voltage for a specified period of time, so that the motor angle calculation unit calculates the actual angle of the motor for each scanning operation.
8. The apparatus as claimed in claim 6 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that, if the actual angle is larger than the previous angle, the direction of the motor is determined as clockwise, and the electronic revolution of the panning/tilting motor COUNTER(elec_rev) is increased by 1, while if a value of the increased electronic revolution COUNTER(elec_rev) is larger than a value which is obtained by multiplying the number of poles of the motor by a gear ratio, the value of the increased electronic revolution COUNTER(elec_rev) is substituted by elec_rev =elec_rev−(the number of poles of the motor*gear ratio).
9. The apparatus as claimed in claim 6 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that if the actual angle is smaller than the previous angle, the direction of the motor is determined as counterclockwise, and the electronic revolution of the panning/tilting motor COUNTER (elec_rev) is decreased by 1, while if a value of the decreased electronic revolution COUNTER(elec_rev) is smaller than 0, the value of the electronic revolution COUNTER(elec_rev) is substituted by elec_rev =elec_rev+(the number of poles of the motor*gear ratio).
10. The apparatus as claimed in claim 6 , wherein the control unit comprises a PI position control unit for controlling the position or speed so that a predetermined target position coordinate of the panning/tilting motor is compared with the actual position coordinate of the panning/tilting motor calculated by the position coordinate calculation unit and, if the target position coordinate of the of the panning/tilting motor is different from the actual position coordinate, the panning/tilting motor moves as far as the difference to reach the target position.
11. A method for controlling a panning/tilting motor of a monitoring camera, comprising the steps of:
(1) calculating an actual angle of the motor based on an output of a hall sensor provided in the motor:
(2) calculating an actual position of the panning/tilting motor based on the actual angle of the motor calculated in the angle calculation step (1); and
(3) calculating a difference between a predetermined target position coordinate of the panning/tilting motor and the actual position coordinate of the panning/tilting motor by comparing the coordinates with each other and, if the target position coordinate of the panning/tilting motor is different from the actual position coordinate, controlling the position or speed of the panning/tilting motor so that the motor moves as far as the difference to reach the target position;
wherein the actual position of the panning/tilting motor is calculated as follows:
actual position=(elec_rev*360 degrees+actual angle of motor);
wherein the elec_rev represents a value of electronic rotation of the motor COUNTER.
12. The method as claimed in claim 11 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that if the actual angle is larger than the previous angle, the direction of the motor is determined as clockwise, and the electronic revolution of the panning/tilting motor COUNTER(elec_rev) is increased by 1, while if a value of the increased electronic revolution COUNTER(elec_rev) is larger than a value which is obtained by multiplying the number of poles of the motor by a gear ratio, the value of the increased electronic revolution COUNTER(elec_rev) is substituted by elec_rev=elec_rev−(the number of poles of the motor*gear ratio).
13. The method as claimed in claim 11 , wherein the electronic revolution of the motor COUNTER(elec_rev) is calculated such that if the actual angle is smaller than the previous angle, the direction of the motor is determined as counterclockwise, and the electronic revolution of the panning/tilting motor COUNTER(elec_rev) is decreased by 1, while if a value of the decreased electronic revolution COUNTER (elec_rev) is smaller than 0, the value of the electronic revolution COUNTER(elec_rev) is substituted by elec_rev=elec_rev+(the number of poles of the motor*gear ratio).
14. The method as claimed in claim 11 , wherein the step (1) of calculating the actual angle of the motor comprises the steps of:
amplitude-modulating an output voltage of the hall sensor built in the motor with predetermined and substantially the same amplitude and offset; and
receiving the amplitude-modulated 3-phase signal as a digital signal, scanning the signal for a specified period of time and calculating the actual angle of the motor for each scanning operation.
15. The method as claimed in claim 14 , wherein the step of calculating the actual angle of the motor comprises the steps of:
receiving amplitude modulated 3-phase signal as a digital signal and dividing the signal into a desired number of sections represented by at least sections 1 , 2 , 3 , 4 , 5 and 6 according to a size order (a>b>c) of a value scanned for a specified period of time where a, b and c represent respective phases of the 3 -phase signal;
calculating X=(a−b), Y=(b−c) and ratio max[X, Y]/min[X,Y]) based on a maximum value (a), an intermediate value (b), and a minimum value (c) in each section;
determining whether an angle of the motor is increased or decreased;
if the angle is decreased, calculating a ratio value for each section of which the angle is decreased in the section (n), and preparing a first table based on the ratio value for each section, while if the angle is increased, calculating a ratio value for each section of which the angle is increased in the section (n), and preparing a second table based on the ratio value for each section;
determining whether each section is a section 2 , 4 or 6 ; and
if each section is the section 2 , 4 or 6 in the step of determining the section, determining whether the value X is smaller than the value Y, and if the value X is smaller than the value Y, adding each offset value to a value of a table address having a most approximate value to the ratio value with reference to the first table to calculate an electronic angle of the motor.
16. The method as claimed in claim 15 , further comprising the step of, if each section is the section 2 , 4 or 6 in the step of determining the section and if the value X is larger than the value Y, adding each offset value to a value of a table address having a most approximate value to the ratio value with reference to the second table to calculate the electronic angle of the motor.
17. The method as claimed in claim 16 , further comprising the step of, if each section is not the section 2 , 4 or 6 in the step of determining the section and if the value X is smaller than the value Y, adding each offset value to a value of a table address having a most approximate value to the ratio value with reference to the second table to calculate the electronic angle of the motor.
18. The method as claimed in claim 15 , further comprising the step of, if each section is not the section 2 , 4 or 6 in the step of determining the section, determining whether the value X is smaller than the value Y, and if the value X is smaller than the value Y, adding each offset value to a value of a table address having a most approximate value to the ratio value with reference to the second table to calculate the electronic angle of the motor.