KR100858020B1 - Apparatus and method for controlling position of a motor using pulse width modulation - Google Patents

Apparatus and method for controlling position of a motor using pulse width modulation Download PDF

Info

Publication number
KR100858020B1
KR100858020B1 KR1020070012193A KR20070012193A KR100858020B1 KR 100858020 B1 KR100858020 B1 KR 100858020B1 KR 1020070012193 A KR1020070012193 A KR 1020070012193A KR 20070012193 A KR20070012193 A KR 20070012193A KR 100858020 B1 KR100858020 B1 KR 100858020B1
Authority
KR
South Korea
Prior art keywords
motor
pwm signal
signal
pulse
adjusting
Prior art date
Application number
KR1020070012193A
Other languages
Korean (ko)
Other versions
KR20080073496A (en
Inventor
송진우
신준명
김상범
Original Assignee
(주)마이크로인피니티
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)마이크로인피니티 filed Critical (주)마이크로인피니티
Priority to KR1020070012193A priority Critical patent/KR100858020B1/en
Publication of KR20080073496A publication Critical patent/KR20080073496A/en
Application granted granted Critical
Publication of KR100858020B1 publication Critical patent/KR100858020B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/06Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current
    • H02P7/18Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power
    • H02P7/24Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices
    • H02P7/28Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices
    • H02P7/285Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only
    • H02P7/29Arrangements for regulating or controlling the speed or torque of electric DC motors for regulating or controlling an individual dc dynamo-electric motor by varying field or armature current by master control with auxiliary power using discharge tubes or semiconductor devices using semiconductor devices controlling armature supply only using pulse modulation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02MAPPARATUS FOR CONVERSION BETWEEN AC AND AC, BETWEEN AC AND DC, OR BETWEEN DC AND DC, AND FOR USE WITH MAINS OR SIMILAR POWER SUPPLY SYSTEMS; CONVERSION OF DC OR AC INPUT POWER INTO SURGE OUTPUT POWER; CONTROL OR REGULATION THEREOF
    • H02M7/00Conversion of ac power input into dc power output; Conversion of dc power input into ac power output
    • H02M7/42Conversion of dc power input into ac power output without possibility of reversal
    • H02M7/44Conversion of dc power input into ac power output without possibility of reversal by static converters
    • H02M7/48Conversion of dc power input into ac power output without possibility of reversal by static converters using discharge tubes with control electrode or semiconductor devices with control electrode
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/02Arrangements for regulating or controlling the speed or torque of electric DC motors the DC motors being of the linear type
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P7/00Arrangements for regulating or controlling the speed or torque of electric DC motors
    • H02P7/03Arrangements for regulating or controlling the speed or torque of electric DC motors for controlling the direction of rotation of DC motors

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

본 발명은 PWM(Pulse Width Modulation)을 이용하여 모터를 제어하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for controlling a motor using pulse width modulation (PWM).

본 발명의 일 실시예에 따른 모터 제어 장치는, 소정의 운동을 발생시키는 모터와, 모터의 현재 위치에 관한 센서 값을 감지하는 위치 센서와, 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하는 제어 판단 루프와, 구해진 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절하는 펄스 조절부와, 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동하는 모터 드라이버로 이루어진다.Motor control apparatus according to an embodiment of the present invention, the motor generating a predetermined motion, the position sensor for detecting a sensor value of the current position of the motor, the sensor value and the target value to be compared by comparing the error value A control decision loop for obtaining a signal, a pulse controller for adjusting the pulse width and the number of pulses of the PWM signal according to the obtained error value, and a motor driver for driving the motor by the power input to the motor based on the adjusted PWM signal. .

PWM, 모터, 펄스 폭, 펄스 수, 분기 신호 PWM, motor, pulse width, number of pulses, branch signal

Description

PWM을 이용한 모터 위치 제어 장치 및 방법{Apparatus and method for controlling position of a motor using pulse width modulation}Apparatus and method for controlling position of a motor using pulse width modulation}

도 1은 본 발명의 제1 실시예에 따른 펄스 폭 제어에 의한 모터 구동 방식을 보여주는 도면.1 is a view showing a motor driving method by pulse width control according to a first embodiment of the present invention.

도 2는 모터 드라이버에 입력되는 두 신호 쌍의 생성을 보여주는 도면.2 shows the generation of two signal pairs input to a motor driver.

도 3은 본 발명의 제2 실시예에 따른 펄스 수 제어에 의한 모터 구동 방식을 보여주는 도면.3 is a diagram illustrating a motor driving method using pulse number control according to a second exemplary embodiment of the present invention.

도 4는 듀티 사이클과 모터의 제어 간의 관계를 보여주는 도면.4 shows the relationship between the duty cycle and the control of the motor.

도 5는 본 발명의 제3 실시예에 따른 펄스 폭 및 펄스 수 제어에 의한 모터 구동 방식을 보여주는 도면.5 is a view showing a motor driving method by controlling the pulse width and the number of pulses according to the third embodiment of the present invention.

도 6은 본 발명의 제4 실시예에 따른 분기 신호에 의한 모터 구동 방식을 보여주는 도면.6 is a view showing a motor driving method by a branch signal according to a fourth embodiment of the present invention.

도 7은 분기 신호에 의하여 펄스 폭을 변화시키는 예를 보여주는 도면.7 shows an example of changing a pulse width by a branch signal;

도 8은 본 발명의 다른 실시예에 따른 듀티 사이클과 모터의 제어 간의 관계를 보여주는 도면.8 illustrates a relationship between a duty cycle and control of a motor according to another embodiment of the present invention.

도 9는 본 발명의 일 실시예에 따른 모터 제어 장치의 구성을 도시하는 도면.9 is a diagram showing a configuration of a motor control apparatus according to an embodiment of the present invention.

도 10은 본 발명의 일 실시예에 따른 모터 제어 방법을 보여주는 흐름도.10 is a flowchart showing a motor control method according to an embodiment of the present invention.

(도면의 주요부분에 대한 부호 설명)(Symbol description of main part of drawing)

100 : 모터 제어 장치 110 : A/D 컨버터100: motor control unit 110: A / D converter

120 : 신호 처리부 130 : 제어 판단 루프120: signal processor 130: control decision loop

140 : 오실레이터 150 : 펄스 조절부140: oscillator 150: pulse control unit

151 : 펄스 폭 조절부 152 : 펄스 수 조절부151 pulse width adjusting unit 152 pulse number adjusting unit

153 : 분기 신호 적용부 160 : 전원153: branch signal application unit 160: power

170 : 모터 드라이버 180 : 모터170: motor driver 180: motor

190 : 위치 센서190: position sensor

본 발명은 PWM(Pulse Width Modulation)을 이용하여 모터를 제어하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for controlling a motor using pulse width modulation (PWM).

시간과 크기 모두에서 제한되지 않은 분해능(resolution)을 가지는 아날로그 신호는 연속적으로 변하는 값을 가진다. 특정 전압 값이 기재된 배터리는 출력 전압이 정확히 전압 값이 아니라 시간에 대해 항상 변하며 임의의 실수 값을 가질 수 있다. 마찬가지로 배터리에서 출력되는 전류의 양 또한 일정한 값으로 제한되지 않는다. 이에 비하여, 디지털 신호는 항상 미리 결정된 집합(0V, 5V)와 같이 제한된 집합 내의 값을 가진다는 면에서 아날로그 신호와 구분된다.Analog signals with unrestricted resolution in both time and magnitude have continuously varying values. Batteries listed with a specific voltage value may have an arbitrary real value, with the output voltage always changing over time rather than the exact voltage value. Likewise, the amount of current output from the battery is not limited to a constant value. In contrast, digital signals are distinguished from analog signals in that they always have values within a limited set, such as a predetermined set (0V, 5V).

아날로그 전압과 전류는 자동차 라디오의 볼륨 등과 같이 직접적으로 무언가를 조절하는데 사용된다. 간단한 라디오에서 볼륨 조절기는 가변 저항과 연결 되어있다. 손잡이를 돌리면 저항은 커지거나 작아진다. 이 순간 저항을 통해 흐르는 전류의 양 또한 많아지거나 적어진다. 이를 통해 볼륨은 증가하거나 줄어든다. 아날로그 회로는 라디오와 같이 출력이 선형적으로 입력에 비례한다.Analog voltages and currents are used to directly control something, such as the volume of a car radio. On a simple radio, the volume control is connected with a variable resistor. Turn the knob to increase or decrease the resistance. At this moment, the amount of current flowing through the resistor also increases or decreases. This increases or decreases the volume. Analog circuits, like radios, have a linear output proportional to the input.

하지만, 아날로그 제어가 직관적이고 간단하게 보인다고 해서 항상 경제적으로도 매력이 있거나 실용적인 것은 아니다. 하나의 예로 아날로그 회로는 시간에 대해 항상 변화하므로 수정하기가 매우 까다롭다. 이러한 문제를 해결한 정교한 아날로그 회로도 크고 무겁거나 비싸며, 다량의 열을 발생시키기도 하는 문제점을 안고 있다. However, just because analog control looks intuitive and simple doesn't always make it economically attractive or practical. As an example, analog circuits are constantly changing over time and are very difficult to modify. Sophisticated analog circuits that solve this problem are also large, heavy or expensive, and generate a lot of heat.

소모 전력은 연결된 기기를 통해 흐르는 전류와 이들 사이의 전압의 곱에 비례한다. 아날로그 회로는 제한되지 않은 분해능으로 인해 또한 잡음에 민감할 수 있다. 심지어 아날로그 신호의 아주 작은 동요도 값을 변화 시킨다.Power consumption is proportional to the product of the current flowing through the connected equipment and the voltage between them. Analog circuitry can also be noise sensitive due to unrestricted resolution. Even the smallest fluctuations in the analog signal change the value.

이러한 순수한 아날로그 제어에 비하여, 디지털화를 통하여 아날로그 회로를 제어하면 시스템의 가격과 전력 소모는 급격히 줄어들 수 있다. 이미 많은 마이크로 컨트롤러와 DSP(Digital Signal Processor)들은 구현을 용이하도록 하는 PWM 컨트롤러를 내장하고 있다.Compared to pure analog control, controlling analog circuits through digitalization can drastically reduce the cost and power consumption of the system. Many microcontrollers and digital signal processors (DSPs) already have a built-in PWM controller that facilitates implementation.

즉, PWM은 아날로그 신호를 디지털화하여 인코딩하는 방법이다. 고분해능의 카운터를 통해 사각형파의 듀티 사이클(duty cycle)은 특정 아날로그 신호를 인코드하기 위해 변조된다. 직류 전원 공급장치는 ON 또는 OFF 이므로 임의의 주어진 시간에 PWM 신호는 여전히 디지털 신호이다. 일련의 반복되는 ON, OFF 펄스를 통해 전압이나 전류가 아날로그 장치에 공급된다. ON 구간은 직류 전원이 아날로그 장치에 공급되는 동안을 말하며 OFF 구간은 전원 공급 스위치가 차단된 기간을 의미한다. 만약 충분한 대역폭이 주어진다면 어떠한 아날로그 값도 PWM을 통해 인코드 될 수 있다. 간단히 이러한 PWM 신호의 듀티 사이클을 조절함으로써, 아날로그 신호의 제어가 가능하다. 예를 들어, 9V로 전원 공급이 이루어지고 있고 듀티 사이클이 10%라면 0.9V의 아날로그 신호가 결과로서 나온다.In other words, PWM is a method of digitizing and encoding analog signals. With a high resolution counter, the duty cycle of the square wave is modulated to encode a particular analog signal. Since the DC power supply is ON or OFF, at any given time the PWM signal is still a digital signal. Voltage or current is supplied to the analog device through a series of repeated ON and OFF pulses. The ON section refers to the period during which DC power is supplied to the analog device, and the OFF section refers to the period during which the power supply switch is shut off. If enough bandwidth is given, any analog value can be encoded via PWM. By simply adjusting the duty cycle of this PWM signal, it is possible to control the analog signal. For example, if the supply is powered at 9V and the duty cycle is 10%, the resulting analog signal is 0.9V.

이와 같이 PWM을 이용하여 아날로그 시스템을 제어하는 기술은 전기 시스템, 기계 시스템 등의 다양한 산업 분야에서 이용되고 있다. 특히, 아날로그 기계 시스템 중 하나인 모터(회전 모터, 선형 모터 등)의 구동에 있어 PWM이 많이 이용된다. 종래의 모터 구동에 이용되는 PWM은 구동방식에 따라 다소 차이는 있으나, 고정된 펄스 폭을 이용하여 정회전, 역회전, 일시정지 등으로 단순한 모터 구동을 수행하는 데 머물렀다. 예를 들어, 듀티 사이클이 25%이면 모터의 등속 정회전을, 75%면 모터의 등속 역회전을, 그리고 50%이면 모터의 일시 정지를 의미한다.As described above, a technique for controlling an analog system using PWM is used in various industrial fields such as an electric system and a mechanical system. In particular, PWM is widely used to drive a motor (rotary motor, linear motor, etc.) which is one of the analog mechanical systems. The PWM used in the conventional motor driving is somewhat different depending on the driving method, but it has remained to perform a simple motor driving by the forward rotation, reverse rotation, and pause using a fixed pulse width. For example, a duty cycle of 25% means a constant speed forward rotation of the motor, 75% a constant speed reverse rotation of the motor, and 50% means a pause of the motor.

하지만, 카메라의 손 떨림 보정 장치, 이동 로봇의 운동 제어 장치 등 외부 입력의 변화에 따라 모터 구동을 다양하고 정밀한 제어 기법이 필요한 분야에 있어서는, 기존의 단순한 모터 구동 제어 기법으로는 충분하지 못하다.However, the conventional simple motor drive control technique is not sufficient in a field requiring various and precise control techniques for driving the motor according to changes in external input such as a camera shake correction device and a motion control device of a mobile robot.

본 발명이 이루고자 하는 기술적 과제는, PWM을 이용하여 다양한 모터 구동을 제어할 수 있는 방법 및 장치를 제공하고자 하는 것이다.It is an object of the present invention to provide a method and apparatus capable of controlling various motor driving using PWM.

본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.Technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the following description.

상기한 기술적 과제를 달성하기 위하여, 본 발명의 일 실시예에 따른, PWM을 이용하여 모터의 운동을 제어하는 모터 제어 장치는, 소정의 운동을 발생시키는 모터; 상기 모터의 현재 위치에 관한 센서 값을 감지하는 위치 센서; 상기 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하는 제어 판단 루프; 상기 구한 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절하는 펄스 조절부; 및 상기 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동하는 모터 드라이버를 포함한다.In order to achieve the above technical problem, according to an embodiment of the present invention, a motor control device for controlling the movement of the motor using PWM, the motor for generating a predetermined movement; A position sensor for sensing a sensor value relating to a current position of the motor; A control decision loop for comparing the sensor value with a target value to obtain an error value; A pulse adjusting unit for adjusting the pulse width and the number of pulses of the PWM signal according to the obtained error value; And a motor driver for driving the motor by power input to the motor based on the adjusted PWM signal.

상기한 기술적 과제를 달성하기 위하여, 본 발명의 일 실시예에 따른, PWM을 이용하여 모터의 운동을 제어하는 모터 제어 방법은, 모터의 현재 위치에 관한 센서 값을 감지하는 단계; 상기 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하는 단계; 상기 구한 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절하는 단계; 및 상기 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동하는 단계를 포함한다.In order to achieve the above technical problem, according to an embodiment of the present invention, a motor control method for controlling the movement of the motor using PWM, the step of sensing a sensor value relating to the current position of the motor; Obtaining an error value by comparing the sensor value with a target value to be controlled; Adjusting the pulse width and the number of pulses of the PWM signal according to the obtained error value; And driving the motor by power input to the motor based on the adjusted PWM signal.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태 로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various forms. It is provided to fully convey the scope of the invention to those skilled in the art, and the present invention is defined only by the scope of the claims. Like reference numerals refer to like elements throughout.

이하 첨부된 도면들을 참조하여 본 발명의 일 실시예를 상세히 설명한다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 제1 실시예에 따른 펄스 폭 제어에 의한 모터 구동 방식을 보여주는 도면이다. 제1 실시예는, 모터를 구동하고 그 속도를 제어하고자 할 때, 모터로부터 감지된 현재 위치 값과, 사용자가 의도하는 위치 값 간의 차이(이하 오차 값이라고 함)에 따라 펄스 폭을 연산하고, 펄스 폭을 가변함으로써 모터의 속도를 변화시키는 방법이다. 즉, 오차 값이 크면 모터 속도를 보다 빠르게 하여 신속하게 오차 값을 줄이고, 오차 값이 작으면 모터 속도를 보다 느리게 하여 정교하고 정확하게 모터의 위치를 제어할 수 있다.1 is a view showing a motor driving method by pulse width control according to a first embodiment of the present invention. In the first embodiment, when driving the motor and controlling the speed thereof, the pulse width is calculated according to the difference between the current position value detected from the motor and the position value intended by the user (hereinafter referred to as an error value). It is a method of changing the speed of a motor by changing a pulse width. In other words, if the error value is large, the motor speed is faster to reduce the error value, and if the error value is small, the motor speed is slower to precisely and accurately control the position of the motor.

도 1을 참조하면, PWM 신호 A의 초기 펄스(11)의 펄스 폭에 비하여 그 다음 펄스(12)의 펄스 폭이 보다 크다. 이는 초기 상태에 비하여 그 다음 상태에서 오차 값이 더 커진 경우에, 펄스 폭을 증가시켜 보다 빨리 오차 값을 줄여 목표 위치에 신속히 도달하도록 만든다. PWM 신호 A'는 PWM 신호 A와 역상을 갖는 신호로서, 도 2와 같은 모터 드라이버(170)의 두 개의 단자에 쌍으로 입력된다. 이와 같이 역상의 PWM 신호들을 입력하는 방법으로는, PWM 신호 A를 모터 드라이버(170)의 제1 단자에 입력하고, PWM 신호 A를 인버터(21)에 의하여 인버팅(inverting)하여 역상의 PWM 신호 A'를 생성한 후 이를 모터 드라이버(170)의 제2 단자에 입력하는 방법이 사용될 수 있다.Referring to FIG. 1, the pulse width of the next pulse 12 is greater than the pulse width of the initial pulse 11 of the PWM signal A. This increases the pulse width to reduce the error value more quickly to reach the target position when the error value is larger in the next state than in the initial state. The PWM signal A 'is a signal having a reverse phase with the PWM signal A, and is input in pairs to two terminals of the motor driver 170 as shown in FIG. As a method of inputting the reverse phase PWM signals, the PWM signal A is input to the first terminal of the motor driver 170, and the PWM signal A is inverted by the inverter 21 to invert the reverse phase PWM signal. A method of generating A 'and then inputting it to the second terminal of the motor driver 170 may be used.

모터 드라이버(170)는 상기 입력되는 PWM 신호에 따라 전원(160)을 스위칭함으로써 모터(180)의 동작을 제어할 수 있다. 예를 들어, 모터 드라이버(170)는 PWM 신호 A 중에서 HIGH인 구간 동안만 전원(160)이 모터(180)로 흘러 들어가도록 스위칭한다.The motor driver 170 may control the operation of the motor 180 by switching the power supply 160 according to the input PWM signal. For example, the motor driver 170 switches so that the power supply 160 flows into the motor 180 only during a section of the PWM signal A that is HIGH.

이상의 도 2에서는 인버터(21)를 사용하여 원 PWM 신호의 역상인 신호를 생성하는 것으로 설명하였지만, 이는 하나의 실시예에 불과하다. 만약, 원 PWM 신호를 생성하기 위한 신호 생성 장치 이외에, 추가적인 신호 생성 장치를 구비하여 상기 원 PWM 신호의 역상 신호를 생성할 수도 있는 것이다.In FIG. 2, the inverter 21 is used to generate a signal that is inverse of the original PWM signal. However, this is only an example. In addition to the signal generating device for generating the original PWM signal, an additional signal generating device may be provided to generate a reverse phase signal of the original PWM signal.

도 3은 본 발명의 제2 실시예에 따른 펄스 수 제어에 의한 모터 구동 방식을 보여주는 도면이다. 제2 실시예는, 모터를 구동하고 그 이동량(변위)을 제어하고자 할 때, 오차 값에 따라 펄스 수를 연산하고, 펄스 수를 가변함으로써 모터의 이동량을 변화시키는 방법이다. 즉, 오차 값이 크면 펄스 수를 증가시켜 모터의 이동량이 크게 되도록 하고, 오차 값이 작으면 펄스 수를 감소시켜 모터의 이동량이 작게 되도록 하는 것이다.3 is a view showing a motor driving method by pulse number control according to a second embodiment of the present invention. In the second embodiment, when the motor is driven and the movement amount (displacement) is to be controlled, the movement amount of the motor is changed by calculating the number of pulses according to the error value and changing the number of pulses. That is, if the error value is large, the number of pulses is increased to increase the amount of movement of the motor. If the error value is small, the number of pulses is reduced to reduce the amount of movement of the motor.

도 3을 참조하면, PWM 신호의 주기 내에 N개 펄스까지가 존재할 수 있다. 그러면, 사용자는 상기 주기 내에 1 내지 N 사이에서 적절한 펄스 수를 선택하여 모터의 이동량을 조절할 수 있다. 만약, 시간이 경과함에 따라 오차 값이 커진다고 하면, 이에 따라 도 3과 같이 펄스 수를 적절히 늘림으로써 이동량을 증가시킬 수 있다. 물론, 반대로 시간이 경과함에 따라 오차 값이 작아진다고 하면, 이에 따라 펄스 수를 적절히 줄임으로써 이동량을 감소시킬 수 있다. 도 3에서도 PWM 신호 A와 PWM 신호 A'는 서로 역상을 가지며, 모터 드라이버(170)의 두 단자에 쌍으로 입력된다.Referring to FIG. 3, there may be up to N pulses within a period of the PWM signal. The user can then adjust the amount of movement of the motor by selecting the appropriate number of pulses from 1 to N within the period. If the error value increases as time passes, the movement amount can be increased by appropriately increasing the number of pulses as shown in FIG. 3. Of course, on the contrary, if the error value decreases with time, the movement amount can be reduced by appropriately reducing the number of pulses. In FIG. 3, the PWM signal A and the PWM signal A 'have opposite phases, and are input in pairs to two terminals of the motor driver 170.

도 4에서 도시하는 바와 같이, 상기 펄스 폭 제어는 50%를 기준으로 하여, 펄스의 듀티 사이클이 이보다 작으면 정방향 회전을, 이보다 크면 역방향 회전을 의미한다. 예를 들어, 듀티 사이클이 25%인 펄스와 듀티 사이클이 75%인 펄스는 서로 방향이 반대이고 동일한 크기의 속도로 모터가 회전하도록 제어함을 의미한다.As shown in FIG. 4, the pulse width control means forward rotation when the duty cycle of the pulse is smaller than 50% and reverse rotation when it is larger than 50%. For example, a pulse with a duty cycle of 25% and a pulse with a duty cycle of 75% mean that the motor is rotated at opposite speeds and at the same magnitude.

도 5는 본 발명의 제3 실시예에 따른 펄스 폭 및 펄스 수 제어에 의한 모터 구동 방식을 보여주는 도면이다. 제3 실시예는, 모터를 구동하고 그 속도 및 이동량을 함께 제어하고자 할 때, 오차 값에 따라 펄스 폭 및 펄스 수를 연산하고, 상기 펄스 폭 및 상기 펄스 수를 가변함으로써 모터의 속도 및 이동량을 변화시키는 방법이다. 즉, 제3 실시예는 모터의 속도는 펄스 폭으로 제어하고 모터의 이동량은 펄스 수로 제어하는 것으로, 제1 실시예와 제2 실시예의 결합이라고 볼 수 있다. 5 is a view showing a motor driving method by controlling the pulse width and the number of pulses according to the third embodiment of the present invention. In the third embodiment, when driving the motor and controlling the speed and the moving amount together, the pulse width and the pulse number are calculated according to the error value, and the speed and the moving amount of the motor are changed by varying the pulse width and the pulse number. How to change. That is, in the third embodiment, the speed of the motor is controlled by the pulse width and the amount of movement of the motor is controlled by the number of pulses, which can be regarded as a combination of the first and second embodiments.

도 5를 참조하면, 도 3과 같이 펄스 수가 3개에서 5개로 변경됨과 동시에, 각각의 펄스의 펄스 폭도 줄어들거나(w1), 늘어남(w2)을 알 수 있다. 이와 같이, 가변 펄스 폭으로 모터의 속도를 제어함과 동시에 가변 펄스 수로 모터의 이동량을 제어함으로써 보다 정확하고 효율적인 모터 제어가 가능하다.Referring to FIG. 5, as shown in FIG. 3, the number of pulses is changed from three to five, and the pulse width of each pulse is also reduced (w 1 ) or stretched (w 2 ). In this way, more precise and efficient motor control is possible by controlling the speed of the motor with the variable pulse width and controlling the amount of movement of the motor with the variable pulse number.

예를 들어, 오차 값이 크면 펄스 폭을 넓혀 모터의 속도를 높이면서 펄스 수를 증가시키고 모터의 이동량도 증가시킴으로써 상기 오차 값을 보다 빠른 시간 내에 줄일 수 있고, 오차 값이 작으면 펄스 폭을 줄여 속도를 낮추고 펄스 수도 줄여 이동량을 감소시키는 대신에 보다 정확한 제어를 할 수 있게 된다. For example, if the error value is large, the pulse width can be widened to increase the speed of the motor to increase the number of pulses and the motor movement amount, thereby reducing the error value in a shorter time. Instead of slowing down speeds and reducing the number of pulses, you get more precise control.

도 5에서도 PWM 신호 A와 PWM 신호 A'는 서로 역상을 가지며, 모터 드라이버(170)의 두 단자에 쌍으로 입력된다.In FIG. 5, the PWM signal A and the PWM signal A 'have opposite phases, and are input in pairs to two terminals of the motor driver 170.

도 6은 본 발명의 제4 실시예에 따른 분기 신호에 의한 모터 구동 방식을 보여주는 도면이다. 제4 실시예는 모터를 구동하여 모터의 속도 및 위치 제어를 하고자 할 때, PWM 신호의 펄스 폭, 펄스 수를 가변하여 모터의 속도 및 위치를 제어하는 방식에 있어서, PWM 신호의 구동주파수 보다 낮은 주파수의 분기 신호를 게이트(예: AND 게이트)에 의하여 곱하는 방식이다. 제4실시예는 PWM 구동 신호를 분할하여 제어할 수 있기 때문에 제어 주기를 가변할 수 있는 효과가 있어 소음발생이나 진동발생을 줄일 수 있는 장점이 있다. 일반적으로, PWM 신호 펄스를 발생시키는 장치의 성능에 있어 중요한 것 중 하나가 펄스 발생 주기이다. 성능이 좋은 장치일 수록 펄스를 변경시킬 수 있는 주기가 짧기 때문에 이 짧은 주기 별로 서로 다른 펄스 발생으로 모터 동작을 조절할 수 있다. 그러나, 펄스 발생 장치의 성능이 높아질수록 그 단가가 높아지므로, 본 발명의 제4 실시예에 따를 경우, 펄스 발생 장치가 펄스를 변경시킬 수 있는 주기는 고정되어 있다고 하더라도, 분기 신호를 이용하여 그 보다 짧은 주기의 모터 제어가 가능해진다.6 is a view showing a motor driving method by a branch signal according to a fourth embodiment of the present invention. In the fourth embodiment, when the speed and position of the motor are controlled by driving the motor, the pulse width and the number of pulses of the PWM signal are varied to control the speed and position of the motor. This is a method of multiplying a branch signal of frequency by a gate (eg, an AND gate). Since the fourth embodiment can control by dividing the PWM driving signal, the control cycle can be changed, thereby reducing noise and vibration. In general, one of the important aspects of a device's ability to generate a PWM signal pulse is the pulse generation period. The better the device, the shorter the period that can change the pulse, so it is possible to control the motor operation by generating different pulses for each short period. However, the higher the performance of the pulse generator, the higher the cost. Therefore, according to the fourth embodiment of the present invention, even if the period in which the pulse generator is able to change the pulse is fixed, the branch signal can be used for the branch signal. Shorter periods of motor control are possible.

도 6과 같이, 특정 주기를 갖는 PWM 신호(A)가 있다고 하고, 그보다 작은 주기를 갖는 분기 신호(B)가 있다고 하면, 두 신호(A, B)를 곱함으로써 상기 특정 주기보다 작은 주기로 펄스 수를 제어할 수 있게 된다.As shown in FIG. 6, if there is a PWM signal A having a specific period, and there is a branch signal B having a smaller period, the number of pulses is less than the specific period by multiplying the two signals A and B. Can be controlled.

한편, 도 7과 같이, 분기 신호를 이용하여 펄스 폭을 변화시키는 것도 가능하다. 도 7을 참조하면, 특정 주기로 균일하게 발생되는 PWM 신호(A)의 펄스들은 분기 신호(B)에 의하여 그 개수가 선택될 수 있을 뿐 아니라, 펄스 폭도 미세하게 조절될 수 있다.On the other hand, as shown in Fig. 7, it is also possible to change the pulse width using the branch signal. Referring to FIG. 7, not only the number of pulses of the PWM signal A uniformly generated at a specific period may be selected by the branch signal B but also the pulse width may be finely adjusted.

예를 들어, 분기 신호(B) 중 어떤 신호(62)는 펄스(61)의 폭을 적절히 감소시킬 수 있다. 이와 같이 분기 신호(B)의 경계 부분에 존재하는 펄스(61)를 미세하게 조절함으로써 모터의 속도를 미세하게 제어할 수 있다. 이 경우 PWM 신호(A) 자체는 동일한 펄스들로 이루어져 있지만 상기 분기 신호(B)에 의하여 펄스 수의 조절 및 펄스 폭의 미세 조절이 가능한 것이다.For example, any of the branch signals B 62 may appropriately reduce the width of the pulse 61. Thus, the speed of the motor can be finely controlled by finely adjusting the pulse 61 present at the boundary of the branch signal B. In this case, the PWM signal A itself consists of the same pulses, but the branch signal B allows the adjustment of the number of pulses and the fine adjustment of the pulse width.

이상의 실시예들에서는 도 4에 도시한 바와 같이, PWM 신호의 50% 듀티비를 기준으로 하여 입력되는 PWM 신호가 이보다 작으면 모터(180)가 제1 방향으로 회전하도록 제어되고, 이보다 크면 모터(180)가 제2 방향(제1 방향과 반대 방향)으로 회전하도록 제어되는 것으로 설명하였다.In the above embodiments, as shown in FIG. 4, when the PWM signal input based on the 50% duty ratio of the PWM signal is smaller than this, the motor 180 is controlled to rotate in the first direction. It has been described that 180 is controlled to rotate in the second direction (the direction opposite to the first direction).

그런데, 모터(180)가 정방향으로 어떤 속도로 회전하는 경우와, 모터(180)가 역방향으로 상기 속도로 회전하는 경우는, 서로 물리적으로 대칭되는 구조를 갖는다. 그러나, 도 4와 같은 제어 방식에 따르면, 예를 들어, 모터(180)가 정방향으로 특정 속도로 회전하게 하기 위한 듀티비는 25%인데, 모터(180)가 역방향으로 같은 속도로 회전하게 하기 위한 듀티비는 75%이다. 따라서, 이러한 제어 방식은 물리적인 대칭구조를 이루지 못하므로 정방향 및 역방향 간의 전환시 불평형에 의한 진동이 발생할 수 있고, 장기간 사용시 비대칭 마모 등이 발생할 수도 있다.By the way, when the motor 180 rotates at a certain speed in the forward direction, and when the motor 180 rotates at the speed in the reverse direction, it has a structure that is physically symmetric with each other. However, according to the control scheme as shown in FIG. 4, for example, the duty ratio for causing the motor 180 to rotate at a specific speed in the forward direction is 25%, for the motor 180 to rotate at the same speed in the reverse direction. Duty ratio is 75%. Therefore, such a control method does not achieve a physical symmetry structure, so oscillation may occur due to unbalance when switching between forward and reverse directions, and asymmetric wear may occur when used for a long time.

이러한 점을 고려할 때, 도 8에 도시하는 바와 같이 PWM 신호의 듀티비(D)는 항상 50%이하에서 펄스 폭에 따라 속도의 크기를 제어하되, 회전 방향은 PWM 신호가 어떤 단자로 입력되는가에 의하여 결정하는 실시예를 생각할 수 있다.Considering this point, as shown in Fig. 8, the duty ratio (D) of the PWM signal always controls the magnitude of the speed according to the pulse width at 50% or less, but the direction of rotation depends on which terminal the PWM signal is input. The embodiment determined by this can be considered.

상기 실시예에 따르면, 예를 들어, 도 2의 제1 단자(A)에 듀티비가 25%인 PWM 신호를 입력하면 모터(180)는 특정 속도로 정방향으로 회전하고, 제2 단자(A') 에 듀티비가 25%인 PWM 신호를 입력하면 모터(180)는 같은 속도로 역방향으로 회전하게 된다. 물론, 이 때, PWM 신호가 입력되는 단자의 반대편 단자에는 상기 PWM 신호와 역상인 신호가 입력된다.According to the above embodiment, for example, when the PWM signal having a duty ratio of 25% is input to the first terminal A of FIG. 2, the motor 180 rotates in the forward direction at a specific speed, and the second terminal A ' When a PWM signal having a duty ratio of 25% is input to the motor, the motor 180 rotates in the reverse direction at the same speed. Of course, at this time, the signal opposite to the PWM signal is input to the terminal opposite to the terminal to which the PWM signal is input.

이러한 실시예에 따르면, PWM 신호의 펄스 폭을 절반 이하만으로 한정 하면서도, 모터(180)의 정방향 제어 및 역방향 제어가 가능하고, 모터(180)의 물리적인 대칭성도 유지할 수 있게 된다.According to this embodiment, the pulse width of the PWM signal is limited to less than half, the forward and reverse control of the motor 180 is possible, and the physical symmetry of the motor 180 can be maintained.

도 9는 본 발명의 일 실시예에 따른 모터 제어 장치(100)의 구성을 도시하는 도면이다. 모터 제어 장치(100)는 A/D 컨버터(110), 신호 처리부(120), 제어 판단 루프(130), 오실레이터(140), 펄스 조절부(150), 전원(160), 모터 드라이버(170), 모터(180) 및 위치 센서(190)를 포함하여 구성될 수 있다.9 is a diagram illustrating the configuration of the motor control apparatus 100 according to an embodiment of the present invention. The motor control apparatus 100 includes the A / D converter 110, the signal processor 120, the control decision loop 130, the oscillator 140, the pulse controller 150, the power supply 160, and the motor driver 170. It may be configured to include a motor 180 and a position sensor 190.

위치 센서(190)는 소정의 위치 검출 소자로부터의 검출 신호에 근거하여, 모터(180)의 현재 위치에 관한 검출 신호를 A/D 컨버터(100)에 제공한다. 상기 위치 검출 소자는 예를 들어, PSD(Position Sensitive Device)로 이루어질 수 있다.The position sensor 190 provides the A / D converter 100 with a detection signal regarding the current position of the motor 180 based on the detection signal from the predetermined position detection element. The position detecting device may be made of, for example, a Position Sensitive Device (PSD).

A/D 컨버터(110)는 위치 센서(190)의 검출 신호(아날로그)를 받아 이를 디지털 값으로 변환한다.The A / D converter 110 receives a detection signal (analog) of the position sensor 190 and converts it to a digital value.

신호 처리부(120)는 상기 변환된 디지털 값에 대하여 소정의 필터(filter) 처리나 적분 처리를 행하고, 처리 된 결과(처리된 센서 값)를 제어 판단 루프(130)에 입력한다. The signal processor 120 performs predetermined filter processing or integration processing on the converted digital value, and inputs the processed result (processed sensor value) to the control decision loop 130.

제어 판단 루프(130)는 신호 처리부(120)에서 처리된 센서 값과 제어하고자 하는 목표 위치를 비교하여 그 오차 값을 구한다. 단, 이 오차 값은 완전히 영(zero)이 되지 않아도 좋고, 미리 설정한 소정의 오차 값을 목표치로 할 수도 있다. 예를 들면, 상기 오차 값을 서보(servo) 주기로 나눈 연산에 따라서 구할 수도 있다. 제어 판단 루프(130)는 사용자 정의 레지스터 선언, 인터럽트 벡터 정의 및 내부 구성 레지스터 설정 등의 초기화 기능을 추가적으로 수행할 수 있다.The control decision loop 130 compares the sensor value processed by the signal processor 120 with a target position to be controlled to obtain an error value. However, the error value does not have to be completely zero, and the predetermined error value set in advance may be a target value. For example, the error value may be obtained according to an operation divided by a servo period. The control decision loop 130 may additionally perform initialization functions such as user-defined register declaration, interrupt vector definition, and internal configuration register setting.

한편, 하드웨어의 관점에서, 제어 판단 루프(130)는 제어 프로그램 등을 기억하는 ROM(Read Only Memory), 일시적으로 데이터를 격납하는 RAM(Random Access Memory) 및 상기 제어 프로그램 등을 ROM으로부터 판독하고 실행하는 CPU(Central Processing Unit) 등으로 이루어진다. 제어 판단 루프(130)는 상기 오차 값이 큰 경우에는 모터(180)가 빠른 속도 및 큰 이동량을 갖도록 펄스 조절부(150)를 제어한다.On the other hand, from a hardware point of view, the control decision loop 130 reads and executes a ROM (Read Only Memory) for storing a control program and the like, a Random Access Memory (RAM) for temporarily storing data, and the control program and the like from the ROM. CPU (Central Processing Unit) or the like. If the error value is large, the control decision loop 130 controls the pulse controller 150 to have a high speed and a large amount of movement of the motor 180.

펄스 조절부(150)는 오실레이터(140)로부터 발생되는 기본 펄스파를 입력받고, 제어 판단 루프(130)로부터 제공된 오차 값에 근거하여, 본 발명의 제1 실시예 내지 제3 실시예에 따라, 상기 펄스파의 펄스 폭 및/또는 펄스 수를 조절하고 PWM 신호를 생성한다. 또한, 펄스 조절부(150)는, 본 발명의 제4 실시예와 같이, 상기 펄스 폭 및/또는 펄스 수가 조절된 PWM 신호에 기본 펄스파의 주파수보다 낮은 주 파수의 분기 신호를 게이트로 연결하여 PWM 신호 및 분기 신호의 곱을 구한다.더욱 상세하게는, 펄스 조절부(150)는 모터(180)의 회전 속도를 변경하기 위하여 상기 기본 펄스파의 펄스 폭을 조절하는 펄스 폭 조절부(151)와, 모터(180)의 이동량을 변경하기 위하여 상기 기본 펄스파의 펄스 수를 조절하는 펄스 수 조절부(152)와, 상기 펄스 폭 및/또는 펄스 수가 조절된 PWM 신호와 분기 신호의 곱을 구하는 분기 신호 적용부(153)로 구성될 수 있다.The pulse controller 150 receives the basic pulse wave generated from the oscillator 140 and based on the error value provided from the control decision loop 130, according to the first to third embodiments of the present invention. The pulse width and / or number of pulses of the pulse wave are adjusted and a PWM signal is generated. In addition, as in the fourth embodiment of the present invention, the pulse adjusting unit 150 connects the branch signal having a frequency lower than the frequency of the fundamental pulse wave to the PWM signal whose pulse width and / or pulse number are adjusted by a gate. More specifically, the pulse controller 150 may include a pulse width controller 151 for adjusting the pulse width of the fundamental pulse wave to change the rotational speed of the motor 180. In order to change the amount of movement of the motor 180, a pulse number adjusting unit 152 for adjusting the number of pulses of the basic pulse wave, and a branch signal for obtaining a product of a PWM signal and a branch signal in which the pulse width and / or number of pulses are adjusted. The application unit 153 may be configured.

펄스 조절부(150)는 최종적으로 조절된 PWM 신호와 그 반전 신호를 모터 드라이버(170)에 제공한다. 상기 PWM 신호의 반전을 위하여 펄스 조절부(150)는 소정의 인버터를 더 구비할 수 있다.The pulse controller 150 provides the finally adjusted PWM signal and its inverted signal to the motor driver 170. In order to invert the PWM signal, the pulse controller 150 may further include a predetermined inverter.

한편, 상기 펄스 조절부(150)는 도 8의 실시예에서 설명한 바와 같이, 상기 PWM 신호를 상기 모터 드라이버의 제1 단자로 입력하여 상기 모터가 정방향으로 회전하도록 제어하고, 상기 PWM 신호를 상기 모터 드라이버의 제2 단자로 입력하여 상기 모터가 역방향으로 회전하도록 제어할 수도 있다.Meanwhile, as described in the embodiment of FIG. 8, the pulse controller 150 controls the motor to rotate in the forward direction by inputting the PWM signal to the first terminal of the motor driver, and controls the PWM signal to the motor. Input to the second terminal of the driver may be controlled to rotate the motor in the reverse direction.

모터 드라이버(170)는, 펄스 조절부(150)로부터 제공된 PWM 신호에 근거하여 전원(160)을 스위칭한다. 예를 들어, 상기 PWM 신호가 High인 구간에서는 스위치를 닫아서 전원(160)이 모터(180)에 제공되도록 하고, PWM 신호가 Low인 구간에서는 스위치를 열어서 전원(160)이 모터(180)에 제공되지 않도록 한다. 모터 드라이버(170)는 예를 들면 소정 수의 스위치 소자(예: N 채널(channel) 또는 P 채널(channel) FET)로부터 구성 되는 브리지 회로로 이루어질 수 있다.The motor driver 170 switches the power supply 160 based on the PWM signal provided from the pulse adjusting unit 150. For example, in a section in which the PWM signal is high, the power supply 160 is provided to the motor 180 by closing the switch, and in a section in which the PWM signal is low, the power supply 160 is provided to the motor 180 by opening the switch. Do not The motor driver 170 may be formed of, for example, a bridge circuit formed from a predetermined number of switch elements (for example, N-channel or P-channel FETs).

모터(180)는 모터 드라이버(170)의 제어에 따라 전원(160)을 공급받아 소정 의 운동을 수행한다. 모터(180)는 회전 모터, 선형 모터, 스텝 모터 등 당업계에 알려진 다양한 모터 및 다양한 액츄에이터를 포함한다.The motor 180 receives the power 160 under the control of the motor driver 170 and performs a predetermined movement. The motor 180 includes various motors and various actuators known in the art, such as rotary motors, linear motors, step motors, and the like.

지금까지 도 9의 각 블록들은 메모리 상의 소정 영역에서 수행되는 태스크, 클래스, 서브 루틴, 프로세스, 오브젝트, 실행 쓰레드, 프로그램과 같은 소프트웨어(software)나, FPGA(field-programmable gate array)나 ASIC(application-specific integrated circuit)과 같은 하드웨어(hardware)로 구현될 수 있으며, 또한 상기 소프트웨어 및 하드웨어의 조합으로 이루어질 수도 있다. 상기 블록들은 컴퓨터로 판독 가능한 저장 매체에 포함되어 있을 수도 있고, 복수의 컴퓨터에 그 일부가 분산되어 분포될 수도 있다.Until now, each block in FIG. 9 is a software, such as a task, a class, a subroutine, a process, an object, an execution thread, a program, or a field-programmable gate array (ASIC) or an application (ASIC) that is performed in a predetermined area of memory. It may be implemented in hardware, such as a -specific integrated circuit, or may be a combination of the above software and hardware. The blocks may be included in a computer-readable storage medium or a part of the blocks may be distributed among a plurality of computers.

또한, 각 블록은 특정된 논리적 기능을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실시예들에서는 블록들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능하다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들은 사실 실질적으로 동시에 수행되는 것도 가능하고 그 블록들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.In addition, each block may represent a module, segment or portion of code that includes one or more executable instructions for executing a specified logical function. It is also possible in some alternative embodiments that the functions mentioned in the blocks occur out of order. For example, the two blocks shown in succession may in fact be executed substantially concurrently, and the blocks may sometimes be executed in the reverse order, depending on the corresponding function.

도 10은 본 발명의 일 실시예에 따른 모터 제어 방법(100)을 보여주는 흐름도이다.10 is a flowchart illustrating a motor control method 100 according to an embodiment of the present invention.

먼저, 제어 판단 루프(130)는 사용자 정의 레지스터 선언, 인터럽트 벡터 정의 및 내부 구성 레지스터 설정 등의 초기화를 수행한다(S10).First, the control decision loop 130 initializes a user-defined register declaration, an interrupt vector definition, and an internal configuration register setting (S10).

모터(180)가 구동되면, 위치 센서(190)는 모터(180)의 현재 위치에 관한 센 서 값을 감지한다(S20). 그러면, A/D 컨버터(110)는 상기 감지된 센서 값을 디지털화하고(S30), 신호 처리부(120)는 상기 디지털화된 센서 값에 적분 처리 등의 필터를 적용한다(S40).When the motor 180 is driven, the position sensor 190 detects a sensor value regarding the current position of the motor 180 (S20). Then, the A / D converter 110 digitizes the sensed sensor value (S30), and the signal processor 120 applies a filter such as an integral process to the digitized sensor value (S40).

제어 판단 루프(130)는 상기 신호 처리부(120)에서 필터링된 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하고(S50), 펄스 조절부(150)는 상기 구한 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절한다(S60). 구체적으로, 펄스 조절부(150)에 포함된 펄스 폭 조절부(151)는 상기 모터(180)의 회전 속도를 변경하기 위하여 상기 PWM 신호의 펄스 폭을 조절하고, 펄스 수 조절부(152)는 상기 모터(180)의 이동량을 변경하기 위하여 상기 PWM 신호의 펄스 수를 조절할 수 있다.The control decision loop 130 obtains an error value by comparing the sensor value filtered by the signal processor 120 with a target value to be controlled (S50), and the pulse controller 150 controls the PWM signal according to the obtained error value. The pulse width and the number of pulses are adjusted (S60). Specifically, the pulse width adjusting unit 151 included in the pulse adjusting unit 150 adjusts the pulse width of the PWM signal to change the rotational speed of the motor 180, and the pulse number adjusting unit 152 The number of pulses of the PWM signal may be adjusted to change the movement amount of the motor 180.

또한, 펄스 조절부(150)에 포함되는 분기 신호 적용부(153)는 상기 PWM 신호와, 상기 PWM 신호의 주파수보다 작은 주파수를 갖는 분기 신호의 곱을 구하는 연산을 추가적으로 수행한다(S70). 이러한 연산은 상기 PWM 신호와 상기 분기 신호를 게이트로 연결함으로써 이루어질 수 있다.In addition, the branch signal applying unit 153 included in the pulse controller 150 performs an operation for obtaining a product of the PWM signal and a branch signal having a frequency smaller than the frequency of the PWM signal (S70). This operation may be performed by connecting the PWM signal and the branch signal to a gate.

분기 신호 적용부(153)는 상기 모터(180)의 이동량을 제어하기 위하여, 상기 PWM 신호 중 상기 분기 신호와 오버랩되는 펄스 수를 조절할 수 있으며, 이와 아울러, 상기 모터(180)의 속도를 미세하게 제어하기 위하여, 상기 PWM 신호 중 경계 부분에 존재하는 펄스의 폭을 조절할 수도 있다. 상기 경계 부분에 존재하는 펄스의 폭이 조절될 수 있는 것은, 도 7에 도시한 바와 같이, 상기 PWM 신호와 분기 신호의 연산에 의하여 오버랩되는 부분이 어떤 펄스(61)의 일부(63)를 포함할수도 있기 때문이다.The branch signal applying unit 153 may adjust the number of pulses overlapping the branch signal among the PWM signals in order to control the movement amount of the motor 180, and finely adjust the speed of the motor 180. In order to control, the width of the pulse present in the boundary portion of the PWM signal may be adjusted. The width of the pulse present in the boundary portion can be adjusted, as shown in Figure 7, the portion overlapped by the operation of the PWM signal and the branch signal includes a portion 63 of a certain pulse 61 Because you can.

마지막으로, 모터 드라이버(170)는 상기 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동한다(S80). 이 때, 모터 드라이버(170)에 입력되는 신호는 상기 조절된 PWM 신호 및 상기 조절된 PWM 신호의 역상 신호의 쌍이다. 상기 역상 신호는 상기 조절된 PWM 신호를 인버터를 통하여 인버팅함으로써 생성될 수 있다.Finally, the motor driver 170 drives the motor by the power input to the motor based on the adjusted PWM signal (S80). At this time, the signal input to the motor driver 170 is a pair of the adjusted PWM signal and the reverse phase signal of the adjusted PWM signal. The reversed phase signal may be generated by inverting the regulated PWM signal through an inverter.

이상 첨부된 도면을 참조하여 본 발명의 실시예를 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야 한다.Although embodiments of the present invention have been described above with reference to the accompanying drawings, those skilled in the art to which the present invention pertains may implement the present invention in other specific forms without changing the technical spirit or essential features thereof. I can understand that. Therefore, it should be understood that the embodiments described above are exemplary in all respects and not restrictive.

본 발명에 따르면, PWM을 이용하여 모터의 속도 및 위치를 다양하고 세밀하게 제어할 수 있는 장점이 있다. According to the present invention, there is an advantage in that the speed and position of the motor can be controlled in various ways using PWM.

또한, 본 발명에 따르면, 기본 PWM 신호의 주기보다 작은 주기의 단위로 모터를 정밀하게 제어할 수 있다는 장점도 있다.In addition, according to the present invention, there is an advantage that the motor can be precisely controlled in units of a period smaller than the period of the basic PWM signal.

Claims (22)

PWM(pulse width modulation)을 이용하여 모터의 운동을 제어하는 모터 제어 장치에 있어서,In the motor control device for controlling the movement of the motor by using pulse width modulation (PWM), 소정의 운동을 발생시키는 모터;A motor for generating a predetermined movement; 상기 모터의 현재 위치에 관한 센서 값을 감지하는 위치 센서;A position sensor for sensing a sensor value relating to a current position of the motor; 상기 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하는 제어 판단 루프;A control decision loop for comparing the sensor value with a target value to obtain an error value; 상기 구한 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절하는 펄스 조절부; 및A pulse adjusting unit for adjusting the pulse width and the number of pulses of the PWM signal according to the obtained error value; And 상기 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동하는 모터 드라이버를 포함하는 모터 제어 장치.And a motor driver for driving the motor by power input to the motor based on the adjusted PWM signal. 제1항에 있어서, 상기 모터는 The method of claim 1, wherein the motor 회전 모터, 선형 모터, 스텝 모터 및 액츄에이터 중 어느 하나인 모터 제어 장치.Motor control device which is any one of rotary motor, linear motor, step motor and actuator. 제1항에 있어서, 상기 펄스 조절부는According to claim 1, wherein the pulse control unit 상기 모터의 회전 속도를 변경하기 위하여 상기 PWM 신호의 펄스 폭을 조절하는 펄스 폭 조절부; 및A pulse width adjusting unit for adjusting a pulse width of the PWM signal to change the rotational speed of the motor; And 상기 모터의 이동량을 변경하기 위하여 상기 PWM 신호의 펄스 수를 조절하는 펄스 수 조절부를 포함하는 모터 제어 장치.And a pulse number controller for adjusting the number of pulses of the PWM signal to change the amount of movement of the motor. 제1항에 있어서, 상기 펄스 조절부는According to claim 1, wherein the pulse control unit 상기 PWM 신호와, 상기 PWM 신호의 주파수보다 작은 주파수를 갖는 분기 신호의 곱을 구하는 분기 신호 적용부를 포함하는 모터 제어 장치.And a branch signal application unit for obtaining a product of the PWM signal and a branch signal having a frequency smaller than a frequency of the PWM signal. 제1항에 있어서, 상기 펄스 조절부는According to claim 1, wherein the pulse control unit 상기 PWM 신호를 상기 모터 드라이버의 제1 단자로 입력하여 상기 모터가 정방향으로 회전하도록 제어하고, 상기 PWM 신호를 상기 모터 드라이버의 제2 단자로 입력하여 상기 모터가 역방향으로 회전하도록 제어하는 모터 제어 장치.A motor control device for controlling the motor to rotate in the reverse direction by inputting the PWM signal to the first terminal of the motor driver to control the motor to rotate in the forward direction, and inputting the PWM signal to the second terminal of the motor driver. . 제4항에 있어서, 상기 분기 신호 적용부는The method of claim 4, wherein the branch signal applying unit 상기 PWM 신호와 상기 분기 신호를 게이트로 연결하여 상기 곱을 구하는 모터 제어 장치.And the PWM signal and the branch signal are connected to gates to obtain the product. 제4항에 있어서, 상기 펄스 조절부는The method of claim 4, wherein the pulse control unit 상기 모터의 이동량을 제어하기 위하여, 상기 PWM 신호 중 상기 분기 신호와 오버랩되는 펄스 수를 조절하는 모터 제어 장치In order to control the amount of movement of the motor, the motor control device for adjusting the number of pulses overlapping the branch signal of the PWM signal 제4항에 있어서, 상기 펄스 조절부는The method of claim 4, wherein the pulse control unit 상기 모터의 속도를 미세하게 제어하기 위하여, 상기 PWM 신호 중 경계 부분에 존재하는 펄스의 폭을 조절하는 모터 제어 장치.In order to finely control the speed of the motor, the motor control device for adjusting the width of the pulse present in the boundary portion of the PWM signal. 제1항에 있어서, 상기 모터 드라이버는The method of claim 1, wherein the motor driver 상기 조절된 PWM 신호 및 상기 조절된 PWM 신호의 역상 신호를 쌍으로 입력 받는 모터 제어 장치Motor control device for receiving the adjusted PWM signal and the reversed phase signal of the adjusted PWM signal in pairs 제9항에 있어서, 상기 역상 신호는10. The method of claim 9, wherein the reversed phase signal is 상기 조절된 PWM 신호를 인버터를 통하여 인버팅한 신호인 모터 제어 장치.And a motor inverting the adjusted PWM signal through an inverter. 제1항에 있어서, The method of claim 1, 상기 감지된 센서 값을 디지털화하는 A/D 컨버터; 및An A / D converter for digitizing the sensed sensor value; And 상기 디지털화된 센서 값에 필터를 적용하는 신호 처리부를 더 포함하는 모터 제어 장치.And a signal processor configured to apply a filter to the digitized sensor values. PWM(pulse width modulation)을 이용하여 모터의 운동을 제어하는 모터 제어 방법에 있어서,In the motor control method for controlling the movement of the motor using pulse width modulation (PWM), 모터의 현재 위치에 관한 센서 값을 감지하는 단계;Detecting a sensor value relating to a current position of the motor; 상기 센서 값과 제어하고자 하는 목표 값을 비교하여 오차 값을 구하는 단 계;Obtaining an error value by comparing the sensor value with a target value to be controlled; 상기 구한 오차 값에 따라 PWM 신호의 펄스 폭 및 펄스 수를 조절하는 단계; 및Adjusting the pulse width and the number of pulses of the PWM signal according to the obtained error value; And 상기 조절된 PWM 신호를 기반으로 모터로 입력되는 전원에 의하여 모터를 구동하는 단계를 포함하는 모터 제어 방법.And driving the motor by power input to the motor based on the adjusted PWM signal. 제12항에 있어서, 상기 모터는 The method of claim 12, wherein the motor 회전 모터, 선형 모터, 스텝 모터 및 액츄에이터 중 어느 하나인 모터 제어 방법.A motor control method which is any one of a rotary motor, a linear motor, a step motor and an actuator. 제12항에 있어서, 상기 조절하는 단계는The method of claim 12, wherein the adjusting step 상기 모터의 회전 속도를 변경하기 위하여 상기 PWM 신호의 펄스 폭을 조절하는 단계; 및Adjusting the pulse width of the PWM signal to change the rotational speed of the motor; And 상기 모터의 이동량을 변경하기 위하여 상기 PWM 신호의 펄스 수를 조절하는 단계를 포함하는 모터 제어 방법.And adjusting the number of pulses of the PWM signal to change the amount of movement of the motor. 제12항에 있어서, 상기 조절하는 단계는The method of claim 12, wherein the adjusting step 상기 PWM 신호와, 상기 PWM 신호의 주파수보다 작은 주파수를 갖는 분기 신호의 곱을 구하는 단계를 포함하는 모터 제어 방법.Obtaining a product of the PWM signal and a branch signal having a frequency smaller than a frequency of the PWM signal. 제12항에 있어서, 상기 조절하는 단계는The method of claim 12, wherein the adjusting step 상기 PWM 신호를 상기 모터 드라이버의 제1 단자로 입력하여 상기 모터가 정방향으로 회전하도록 제어하는 단계; 및Controlling the motor to rotate in a forward direction by inputting the PWM signal to a first terminal of the motor driver; And 상기 PWM 신호를 상기 모터 드라이버의 제2 단자로 입력하여 상기 모터가 역방향으로 회전하도록 제어하는 단계를 포함하는 모터 제어 방법.Inputting the PWM signal to the second terminal of the motor driver to control the motor to rotate in the reverse direction. 제15항에 있어서, 상기 조절하는 단계는The method of claim 15, wherein the adjusting is 상기 PWM 신호와 상기 분기 신호를 게이트로 연결하여 상기 곱을 구하는 단계를 포함하는 모터 제어 방법.Connecting the PWM signal and the branch signal to a gate to obtain the product. 제15항에 있어서, 상기 조절하는 단계는The method of claim 15, wherein the adjusting is 상기 모터의 이동량을 제어하기 위하여, 상기 PWM 신호 중 상기 분기 신호와 오버랩되는 펄스 수를 조절하는 단계를 포함하는 모터 제어 방법And controlling the number of pulses overlapping with the branch signal among the PWM signals to control the amount of movement of the motor. 제18항에 있어서, 상기 조절하는 단계는19. The method of claim 18, wherein adjusting 상기 모터의 속도를 미세하게 제어하기 위하여, 상기 PWM 신호 중 경계 부분에 존재하는 펄스의 폭을 조절하는 단계를 더 포함하는 모터 제어 방법.And controlling a width of a pulse present at a boundary of the PWM signal to finely control the speed of the motor. 제12항에 있어서, 상기 구동하는 단계는The method of claim 12, wherein the driving step 상기 조절된 PWM 신호 및 상기 조절된 PWM 신호의 역상 신호를 쌍으로 입력 받는 단계를 포함하는 모터 제어 방법The motor control method comprising the step of receiving the adjusted PWM signal and the reversed phase signal of the adjusted PWM signal in pairs 제20항에 있어서, 상기 역상 신호는21. The method of claim 20, wherein the reversed phase signal is 상기 조절된 PWM 신호를 인버터를 통하여 인버팅한 신호인 모터 제어 방법.And a motor inverting the adjusted PWM signal through an inverter. 제12항에 있어서, The method of claim 12, 상기 감지된 센서 값을 디지털화하는 단계; 및Digitizing the sensed sensor value; And 상기 디지털화된 센서 값에 필터를 적용하는 단계를 더 포함하는 모터 제어 방법.And applying a filter to the digitized sensor values.
KR1020070012193A 2007-02-06 2007-02-06 Apparatus and method for controlling position of a motor using pulse width modulation KR100858020B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070012193A KR100858020B1 (en) 2007-02-06 2007-02-06 Apparatus and method for controlling position of a motor using pulse width modulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070012193A KR100858020B1 (en) 2007-02-06 2007-02-06 Apparatus and method for controlling position of a motor using pulse width modulation

Publications (2)

Publication Number Publication Date
KR20080073496A KR20080073496A (en) 2008-08-11
KR100858020B1 true KR100858020B1 (en) 2008-09-10

Family

ID=39883252

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070012193A KR100858020B1 (en) 2007-02-06 2007-02-06 Apparatus and method for controlling position of a motor using pulse width modulation

Country Status (1)

Country Link
KR (1) KR100858020B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200075282A (en) * 2018-12-18 2020-06-26 전자부품연구원 Automatic Inverter Control Method and System for Energy Saving

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113671970B (en) * 2021-10-25 2022-01-25 中国科学院自动化研究所 Control method and controller of mobile robot
CN114157209A (en) * 2021-11-02 2022-03-08 深圳市创荣发电子有限公司 Motor adjusting method, system, computer readable storage medium and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060030763A (en) * 2004-10-06 2006-04-11 삼성전자주식회사 Motor control device and method thereof
KR20060068967A (en) * 2004-12-17 2006-06-21 삼성전자주식회사 Bldc motor controller, control method thereof and cleaner having bldc motor controller
KR20060131440A (en) * 2005-06-16 2006-12-20 대덕대학산학협력단 An induction motor controlling device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060030763A (en) * 2004-10-06 2006-04-11 삼성전자주식회사 Motor control device and method thereof
KR20060068967A (en) * 2004-12-17 2006-06-21 삼성전자주식회사 Bldc motor controller, control method thereof and cleaner having bldc motor controller
KR20060131440A (en) * 2005-06-16 2006-12-20 대덕대학산학협력단 An induction motor controlling device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200075282A (en) * 2018-12-18 2020-06-26 전자부품연구원 Automatic Inverter Control Method and System for Energy Saving
KR102445273B1 (en) * 2018-12-18 2022-09-20 한국전자기술연구원 Automatic Inverter Control Method and System for Energy Saving

Also Published As

Publication number Publication date
KR20080073496A (en) 2008-08-11

Similar Documents

Publication Publication Date Title
Suganthi et al. Modeling and simulation of closed loop speed control for BLDC motor
US10644629B2 (en) Fan motor driving circuit, driving method, and cooling device and electronic machine using the same
JP5141049B2 (en) Gate voltage control circuit and gate voltage control method
US10122303B2 (en) Motor control device
JP4837354B2 (en) PWM signal generation device, PWM signal generation method, motor control device, and motor control method
KR100858020B1 (en) Apparatus and method for controlling position of a motor using pulse width modulation
JP2016501509A5 (en)
CN110707987A (en) Method and apparatus for controlling cascaded inverter circuits and electric machines
CN105829629A (en) Opening/Closing Body Control Device And Opening/Closing Body Control Method
KR101367680B1 (en) Apparatus for generating control signal for driving a motor
CN103633919B (en) Motor control assembly
Dongale et al. Performance comparison of PID and fuzzy control techniques in three phase induction motor control
Telba DC motor speed control using FPGA
RU2708073C1 (en) Method for stabilization of current level in winding of two-phase bipolar stepper motor in full-step mode and driver for its implementation
RU2737662C1 (en) Method of stabilizing current level in winding of two-winding step motor operating in full-step mode, and driver for its implementation
Neethu et al. Fuzzy logic based speed control of BLDC motor on sensorless technique for space applications
JP2015050876A (en) Motor drive device
TWI552507B (en) Motor speed control circuit and control method thereof
Jamadar et al. Design and development of control system for three phase induction motor using PIC microcontroller
KR101283833B1 (en) Apparatus and method for controlling sunroof
Patil et al. A practical study of improved speed performance of BLDC motors using conventional PI and fuzzy-PI controllers
Arulmozhiyal et al. Real time MATLAB Interface for speed control of Induction motor drive using dsPIC 30F4011
Osivue et al. PID Control of Elderly Assistant and Walking Assistant Robot
TWI788911B (en) Motor controller
JP2017175900A (en) Opening/closing body drive motor and opening/closing body drive system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120821

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20130903

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20140902

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20150615

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee