Lamp correction method, device and system and stage lamp

By using rotating components, motors and magnetic encoders in the stage lamp control system, the angle error to be corrected by the motor is obtained and corrected, the angle deviation problem caused by mechanical errors of stage lamps is solved, and autonomous correction and higher operating stability are achieved. and accuracy.

CN119485860APending Publication Date: 2025-02-18GUANGZHOU CAIYI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411668152.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

After long-term use of stage lamps, due to wear of the lamp body transmission device, there is a mechanical error between the actual operating angle of the lamp body and the theoretical operating angle, which affects normal use.

Method used

Provide a lamp calibration method, by using a rotating member, a motor and a magnetic encoder in a stage lamp control system, the angle error to be corrected by the motor is obtained, and by inputting the correction stepping pulse and the micro-step pulse, the rotating member is driven to move to the target operation. angle, realize independent correction.

Benefits of technology

It effectively solves the problem of angle deviation caused by mechanical errors of stage lamps, realizes independent correction of lamps, and improves operating stability and lighting projection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119485860A_ABST
    Figure CN119485860A_ABST
Patent Text Reader

Abstract

The invention relates to a lamp correction method, device and system and a stage lamp. The lamp correction method comprises the steps of obtaining a to-be-corrected angle error of a motor based on a target operation angle of a rotating component and an actual operation angle of the rotating component; wherein the actual operation angle of the rotating component is measured by a component magnetic encoder; and based on the to-be-corrected angle error of the motor, a correction stepping pulse and a correction micro-step pulse are input to the motor to drive the rotating component to move to the target operation angle of the rotating component. According to the invention, the operation angle error of the stage lamp body can be automatically corrected by the lamp according to different application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of lamp control, and in particular to a lamp calibration method, device, system and stage lamp. Background Art

[0002] Stage lighting is widely used in various performances. After long-term use, the transmission device of the stage lighting (such as synchronous belts and gears) will wear out, resulting in a mechanical error between the actual operating angle of the lamp body and the theoretical operating angle of the lamp body. In addition, this angle error will accumulate with the long-term back-and-forth movement of the lamp body, thus affecting the normal use of the stage lighting. Summary of the invention

[0003] Based on this, it is necessary to provide a lamp calibration method, device, system and stage lamp that can autonomously calibrate stage lamps in response to the above technical problems.

[0004] In a first aspect, in one embodiment, the present application provides a lamp calibration method, which is applied to a stage lamp control system, wherein the system includes a rotating component, a motor for driving the rotating component to rotate, and a component magnetic encoder; the method includes:

[0005] Based on the target operating angle of the rotating component and the actual operating angle of the rotating component, the angle error of the motor to be corrected is obtained; wherein the actual operating angle of the rotating component is measured by the magnetic encoder of the component;

[0006] Based on the angle error to be corrected of the motor, a correction step pulse and a correction micro-step pulse are input to the motor to drive the rotating member to move to the target operating angle of the rotating member.

[0007] In one embodiment, the system further includes a motor magnetic encoder for measuring the actual operating angle of the motor; based on the target operating angle of the rotating component and the actual operating angle of the rotating component, obtaining the angle error to be corrected of the motor includes:

[0008] Obtaining an operating angle error of the rotating component according to a target operating angle of the rotating component and an actual operating angle of the rotating component;

[0009] According to the motor target operating angle and the motor actual operating angle, the motor operating angle error is obtained;

[0010] Based on the motor running angle error, the rotating component running angle error and the transmission ratio between the motor and the rotating component, the motor angle error to be corrected is obtained.

[0011] In one embodiment, based on the angle error to be corrected of the motor, inputting a correction step pulse and a correction micro-step pulse to the motor comprises:

[0012] Based on the angle error of the motor to be corrected, the number of rotations of the motor for correction is obtained;

[0013] Based on the number of corrected motor rotations, the corrected step pulse number and the corrected micro-step pulse number are calculated;

[0014] Based on the number of correction step pulses and the number of correction micro-step pulses, a corresponding number of correction step pulses and correction micro-step pulses are input to the motor.

[0015] In one embodiment, based on the number of corrected motor rotations, the corrected step pulse number and the corrected micro-step pulse number are calculated, including:

[0016] According to the number of motor correction rotations, the number of correction step pulses is calculated based on the following formula:

[0017]

[0018] in, is the number of corrected step pulses, Ra is the pulse step angle of the corrected step pulse, and M is the number of corrected motor rotations;

[0019] According to the pulse step angle and the preset microstep subdivision accuracy, the microstep pulse step angle is calculated based on the following formula:

[0020]

[0021] in, To correct the micro-step pulse step angle of the micro-step pulse, Ra is the pulse step angle of the corrected step pulse, and count is the preset micro-step subdivision accuracy;

[0022] According to the correction step pulse number, pulse step angle and micro-step pulse step angle, the correction micro-step pulse number is calculated based on the following formula:

[0023]

[0024] in, To correct the number of micro-step pulses, step is the number of corrected step pulses, is the pulse step angle, Qms is the micro-step pulse step angle, The value after the decimal point of step.

[0025] In one embodiment, after inputting a corresponding number of correction step pulses and correction micro-step pulses to the motor based on the correction step pulse number and the correction micro-step pulse number, the method further includes:

[0026] According to the number of corrected step pulses and corrected microstep pulses, the motor target step angle is calculated based on the following formula:

[0027]

[0028] in, is the motor target step angle, To calibrate the number of step pulses, is the pulse step angle, To correct the number of microstep pulses, is the micro-step pulse step angle;

[0029] According to the motor's target step angle, the motor's angle data target compensation amount is calculated based on the following formula:

[0030]

[0031] in, is the motor target step angle, is the target compensation amount of the angle data, and Y is the number of resolution bits of the motor magnetic encoder;

[0032] According to the actual running angle of the motor before and after the correction of the angle error to be corrected, the actual compensation amount of the motor angle data is calculated based on the following formula:

[0033]

[0034] in, is the actual compensation amount of the angle data, To correct the angle data output by the motor magnetic encoder after the motor angle error is corrected, The angle data output by the motor magnetic encoder before correcting the angle error to be corrected by the motor;

[0035] Actual compensation amount in response to angle data Equal to the motor target step amount , confirm that the correction of the motor angle error to be corrected is completed.

[0036] In a second aspect, in one embodiment, the present application further provides a lamp control method, which is applied to a stage lamp control system, wherein the system includes a rotating member, a motor for driving the rotating member to rotate, a member magnetic encoder for measuring an actual operating angle of the rotating member, and a motor magnetic encoder for measuring an actual operating angle of the motor; the method includes:

[0037] In response to being in the stage of starting up the lamp, if the lamp body control data is not received, it is determined whether there is power-off memory data; wherein the lamp body control data is used to control the rotation member to move to the target angle, and the power-off memory data includes the lamp body control data cached in the power-off stage, and the power-off stage is the stage in which the power supply output voltage gradually decreases to zero when the system was powered off and shut down last time;

[0038] If the power-off memory data exists and the power-off memory data is a fixed value, then based on the light projection distance of the lamp, the correction reference data for correcting the angle error of the rotating component is determined;

[0039] If there is power-off memory data and the power-off memory data is not a fixed value, the rotating member is driven to rotate by the motor based on the power-off memory data;

[0040] When it is determined that the rotation direction of the rotating component has changed, in response to the actual operating angle of the rotating component being not equal to the target operating angle of the rotating component, the lamp calibration method described in any one of the method embodiments of the first aspect above drives the rotating component to move to the target operating angle of the rotating component.

[0041] In one embodiment, after determining whether there is power-off memory data, the method further includes:

[0042] If there is no power-off memory data, the motor drives the rotating member to move to a reference reset angle, so as to obtain an actual reset angle of the rotating member through a magnetic encoder of the rotating member; the reference reset angle includes a middle value of the rotation angle range of the rotating member;

[0043] In response to the actual reset angle of the rotating member not being equal to the reference reset angle, the rotating member is driven to move to the reference reset angle based on the lamp calibration method described in any one of the method embodiments of the first aspect.

[0044] In a third aspect, in one embodiment, the present application further provides a lamp calibration device, which is applied to a stage lamp control system, the system comprising a rotating component, a motor for driving the rotating component to rotate, and a component magnetic encoder; the device comprises:

[0045] An angle error acquisition module, used to acquire the angle error to be corrected of the motor based on the target operating angle of the rotating component and the actual operating angle of the rotating component; wherein the actual operating angle of the rotating component is measured by the magnetic encoder of the component;

[0046] The angle error correction module is used to input a correction step pulse and a correction micro-step pulse to the motor based on the angle error to be corrected of the motor, so as to drive the rotating component to move to the target operating angle of the rotating component.

[0047] In a fourth aspect, in one embodiment, the present application further provides a stage lighting control system, the system comprising:

[0048] A rotating member, the rotating member includes a lamp body or a main shaft of the lamp, the lamp body includes at least one light source, and the light source is used to generate a light beam;

[0049] The driving wheel and the driven wheel, the driving wheel is connected to the driven wheel through a synchronous belt, the driven wheel is connected to the rotating member, and the driving wheel drives the driven wheel through the synchronous belt to drive the rotating member to rotate to the target angle;

[0050] A motor connected to a motor shaft of the driving wheel, and the motor is used to drive the driving wheel to rotate so as to control the rotating member to move to a target angle;

[0051] A component magnetic encoder, which is connected to the rotating component and is used to measure the actual rotation angle of the rotating component;

[0052] The motor magnetic encoder is connected to the motor and is used to measure the actual rotation angle of the motor;

[0053] The control module is respectively connected to the motor, the component magnetic encoder and the motor magnetic encoder, and the control module is used to execute the steps of the method described in any one of the first aspects above.

[0054] In a fifth aspect, in one embodiment, the present application further provides a stage lighting fixture, comprising the stage lighting fixture control system of the fourth aspect.

[0055] The above-mentioned lamp calibration method can obtain the motor angle error to be corrected based on the target operating angle of the rotating component and the actual operating angle of the rotating component measured by the component magnetic encoder; based on the motor angle error to be corrected, a correction step pulse and a correction micro-step pulse are input to the motor to drive the rotating component to move to the target operating angle of the rotating component. The present application can realize the lamp to autonomously correct the mechanical error between the actual operating angle of the lamp body and the theoretical operating angle of the lamp body. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 is a schematic flow chart of a lamp calibration method in one embodiment;

[0058] Figure 2 is a flow chart of a lamp calibration method in another embodiment;

[0059] Figure 3 A schematic diagram of a process for obtaining an angle error to be corrected for a motor in one embodiment;

[0060] Figure 4 A schematic diagram of a process of inputting a correction step pulse and a correction micro-step pulse in one embodiment;

[0061] Figure 5 is a flow chart of a lamp control method in one embodiment;

[0062] Figure 6 is a structural block diagram of a lamp calibration device in one embodiment;

[0063] Figure 7 FIG. 4 is a structural block diagram of a stage lighting control system in one embodiment. DETAILED DESCRIPTION

[0064] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0066] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.

[0067] Spatially relative terms such as "under," "beneath," "below," "under," "above," "above," and the like may be used herein to describe the relationship of an element or feature shown in the figures to other elements or features. It should be understood that, in addition to the orientations shown in the figures, spatially relative terms also include different orientations of the device in use and operation. For example, if the device in the accompanying drawings is flipped, an element or feature described as "under other elements" or "under it" or "under it" will be oriented as being "above" the other elements or features. Thus, the exemplary terms "under" and "under" may include both upper and lower orientations. In addition, the device may also include additional orientations (e.g., rotated 90 degrees or other orientations), and the spatial descriptors used herein are interpreted accordingly.

[0068] It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to the other element, or connected to the other element through an intermediate element. In addition, the "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc. if there is transmission of electrical signals or data between the connected objects.

[0069] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0070] Stage lighting is widely used in various performances. After long-term use, the transmission device of the stage lighting (such as synchronous belts and gears) will wear out, resulting in a mechanical error between the actual operating angle of the lamp body and the theoretical operating angle of the lamp body. In addition, this angle error will accumulate with the long-term back-and-forth movement of the lamp body, thus affecting the normal use of the stage lighting.

[0071] Based on the above reasons, the present invention provides a lamp calibration method, device, system and stage lamp.

[0072] In one embodiment, Figure 1 As shown, the present application provides a lamp calibration method, which is applied to a stage lamp control system. The system includes a rotating component, a motor for driving the rotating component to rotate, and a component magnetic encoder; the method includes:

[0073] Step S102, based on the target operating angle of the rotating component and the actual operating angle of the rotating component, the angle error of the motor to be corrected is obtained; wherein the actual operating angle of the rotating component is measured by the component magnetic encoder.

[0074] For example, Figure 2 As shown, the rotating component is rigidly connected to the lamp body, and the rotating component can be used to drive the lamp body of the lamp to rotate in a horizontal direction or a vertical direction relative to a horizontal plane, and the actual operating angle of the current rotating component can be measured by the component magnetic encoder.

[0075] Optionally, the driving wheel connected to the motor can use a synchronous belt to drive the driven wheel to drive the rotating component, so that the rotating component can rotate to the target operating angle according to the control instruction, so that the lamp can project light to a specified position in the space.

[0076] It is understandable that in the actual application of lamps, the transmission device in which the driving wheel drives the driven wheel with the synchronous belt may have various mechanical errors, such as the transmission ratio between the driving wheel and the driven wheel (i.e., the rotation ratio between the motor and the rotating member) is not an integer multiple, the poor meshing degree between the synchronous belt and the gear causes a slight virtual position phenomenon in the lamp body, etc. Various mechanical errors may cause the actual operating angle of the rotating member to deviate from the target operating angle of the rotating member that the rotating member of the lamp should theoretically rotate to, and the deviation between the actual operating angle of the rotating member and the target operating angle of the rotating member may be the operating angle error of the rotating member.

[0077] It can be understood that since the rotating member is driven by the motor to rotate to the target angle, in the case of a rotating member operating angle error, the current rotating member operating angle error can be corrected by driving the motor to rotate a certain angle again, and the certain angle that needs to be driven by the motor to rotate in order to correct the rotating member operating angle error can be the motor angle error to be corrected. Optionally, the motor angle error to be corrected can be obtained based on the transmission relationship between the motor and the rotating member.

[0078] Specifically, the motor angle error to be corrected for correcting the operating angle error of the rotating component can be obtained according to the target operating angle of the rotating component and the actual operating angle of the rotating component measured by the component magnetic encoder.

[0079] Step S104 : Based on the angle error to be corrected of the motor, a correction step pulse and a correction micro-step pulse are input to the motor to drive the rotating member to move to a target operating angle of the rotating member.

[0080] It should be noted that the correction step pulse includes an electrical pulse signal that causes the motor to move a corresponding angle. It can be understood that when a pulse signal is input to the motor, the rotor of the motor can rotate a corresponding angle (advance one step), and the rotation angle or linear displacement output by the motor is directly proportional to the number of pulses input thereto. Exemplarily, the required correction micro-step pulse can be obtained by changing the size and distribution of the current in the winding during each pulse, and the correction micro-step pulse can subdivide a basic step angle into multiple smaller steps. For example, a step of 1.8 degrees can be subdivided into 256 micro-steps, so that the rotation angle of each step becomes very small, so as to achieve a very smooth motor movement effect.

[0081] Optionally, the actual running angle of the motor driven by the correction step pulse and the correction micro-step pulse can also be measured by setting a motor magnetic encoder connected to the motor.

[0082] Exemplarily, the magnetic encoder including the motor magnetic encoder and the component magnetic encoder can set the resolution angle as needed. For example, when the above magnetic encoder is a 10-bit magnetic encoder, in the 10-bit magnetic encoder, the magnetic encoder has 2 per turn.10 = 1024 measurement angle data D, at this time the angle resolution of the magnetic encoder is R = 360 / 1024 = 0.35 degrees. For example, the magnetic encoder can also be a 14-bit magnetic encoder; in a 14-bit magnetic encoder, the magnetic encoder has 2 per turn. 14 = 16384 measurement angle data D, at this time the angle resolution of the magnetic encoder is R = 360 / 16384 = 0.02 degrees. According to the following formula 1, the angle of the magnetic encoder measurement output can be obtained:

[0083] Q (Formula 1)

[0084] Among them, Q is the angle measured by the magnetic encoder output, n is the number of bits of the magnetic encoder, R is the minimum resolution angle of the magnetic encoder, D is the binary value converted to decimal input by the magnetic encoder to the control module, and Y is the number of bits of the component magnetic encoder.

[0085] Optionally, the magnetic encoder can output SPI angle data for representing the operating angle to a control module such as an MCU (Microcontroller Unit). For example, when the motor rotates one circle, the SPI angle data output by the 10-bit magnetic encoder for measuring the actual operating angle of the motor can gradually change from 0000000000 to 11111111111; when the motor rotates more than one circle, the SPI angle data output by the 10-bit magnetic encoder gradually changes from 0000000000 to 11111111111.

[0086] Furthermore, 6 data bits may be added to the SPI angle data output by the magnetic encoder to count the number of motor rotations M.

[0087] Optionally, the SPI angle data output by the magnetic encoder can be converted into a decimal number D to reduce calculation complexity and thus improve operation performance.

[0088] Optionally, when the first measurement position of the magnetic encoder does not overlap with the standard initial origin angle of the rotating component, the angle data obtained by the magnetic encoder is a relative angle data that deviates from the actual operating angle data; when the first measurement position of the magnetic encoder overlaps with the standard initial origin angle of the rotating component, the angle data obtained by the magnetic encoder is an absolute angle data in which the magnetic encoder measurement zero point coincides with the actual zero point.

[0089] Exemplarily, when a driving wheel connected to a motor drives a rotating member by using a synchronous belt to drive a driven wheel, based on the number of teeth on the driving wheel and the number of teeth on the driven wheel, there is a transmission ratio relationship between the driving wheel and the driven wheel, and there is also a transmission ratio relationship between the motor and the rotating member.

[0090] Specifically, after obtaining the angle error to be corrected of the motor, a corresponding number of correction step pulses and correction micro-step pulses can be input into the motor to drive the rotating component to move to the target operating angle of the rotating component to correct the operating angle error of the lamp.

[0091] In one embodiment, the system further includes a motor magnetic encoder for measuring the actual operating angle of the motor. Figure 3 As shown, step S102, based on the target operating angle of the rotating component and the actual operating angle of the rotating component, obtain the angle error of the motor to be corrected, including the following steps S302 to S306. Among them:

[0092] Step S302: obtaining a rotating component operating angle error according to the rotating component target operating angle and the rotating component actual operating angle.

[0093] It is understandable that when the target operating angle of the rotating member (theoretical rotation angle of the lamp body) is set to , set the actual operating angle of the rotating component (actual rotation angle of the lamp body) to In the case of , if there is no error between the target operating angle of the rotating member and the actual operating angle of the rotating member, the target operating angle of the rotating member It should be equal to the actual operating angle of the rotating component However, in actual applications, due to long-term operation, the transmission device of the stage lighting may have various mechanical errors. For example, when the synchronous belt and gear of the transmission device have poor meshing, there will be a slight virtual position phenomenon on the lamp body, resulting in corresponding mechanical errors.

[0094] It should be noted that in the actual application of stage lamps, the rotating components in the Y-axis direction and the rotating components in the X-axis direction may have a maximum theoretical rotation angle. Optionally, the maximum theoretical rotation angle of the rotating component in the Y-axis direction (i.e., the Y-axis lamp body) can be set to 270 degrees, i.e. The maximum theoretical rotation angle of the rotating component in the X-axis direction (i.e., the X-axis lamp body) can be set to 540 degrees, i.e. It is understandable that the setting of the maximum theoretical rotation angle or the maximum rotation angle range of the above-mentioned rotating member is not limited to the implementation methods mentioned in the above-mentioned embodiments, and it can be configured accordingly according to actual needs. The setting of the maximum theoretical rotation angle or the maximum rotation angle range of the rotating member in this application is only illustrative and not specifically limited.

[0095] Exemplarily, according to the following formula 2, based on the target operating angle of the rotating member and the actual operating angle of the rotating member, the operating angle error of the rotating member can be obtained:

[0096] (Formula 2)

[0097] in, is the running angle error of the rotating component (i.e. the mechanical error of the lamp body), is the target operating angle of the rotating component (i.e. the theoretical rotation angle of the lamp body), It is the actual operating angle of the rotating component (i.e. the actual rotation angle of the lamp body).

[0098] Specifically, the rotating component operating angle error of the current rotating component can be calculated according to the degree of deviation between the target operating angle of the rotating component and the actual operating angle of the rotating component obtained by the component magnetic encoder.

[0099] Step S304, obtaining a motor operating angle error according to the motor target operating angle and the motor actual operating angle.

[0100] The target operating angle of the motor is the rotation angle position where the motor should be located in theory, and the actual operating angle of the motor is the rotation angle position where the motor is actually located at the moment.

[0101] It is understandable that in the actual application of stage lighting, due to factors such as long-term operation of the motor, the motor itself may produce corresponding mechanical errors, resulting in a deviation between the motor's target operating angle and the motor's actual operating angle, which in turn further causes an operating angle error of some rotating components through the transmission device.

[0102] Specifically, the motor operating angle error may be obtained based on the motor target operating angle and the motor actual operating angle.

[0103] Step S306: obtaining the motor angle error to be corrected based on the motor operation angle error, the rotating component operation angle error and the transmission ratio between the motor and the rotating component.

[0104] Among them, exemplarily, the error sources of the rotating component operating angle error may include the following three aspects: the rotating component operating angle error comes from the motor (i.e., the motor operating angle error); the rotating component operating angle error comes from the mechanical transmission structure, such as the meshing error between the synchronous belt and the motor gear or the meshing error between the synchronous belt and the component gear; the rotating component operating angle error comes from the motor and the mechanical transmission structure.

[0105] In a possible implementation, the angle error to be corrected of the motor can be obtained according to different error sources of the running angle error of the rotating component, including the following steps:

[0106] If it is determined that the running angle error of the rotating component is entirely caused by the running angle error of the motor, then the motor angle error to be corrected may be equal to the current running angle error of the motor;

[0107] If it is determined that the running angle error of the rotating component is entirely caused by the error of the transmission structure, the motor angle error to be corrected can be calculated based on the running angle error of the rotating component and the transmission ratio between the motor and the rotating component;

[0108] If it is determined that the rotating component operating angle error is entirely caused by the motor operating angle error and the error of the transmission structure, the motor angle error to be corrected can be calculated based on the rotating component operating angle error and the motor operating angle error, combined with the transmission ratio between the motor and the rotating component.

[0109] Specifically, based on the motor operation angle error, the rotating component operation angle error and the transmission ratio between the motor and the rotating component, the motor angle error to be corrected can be calculated according to different error sources.

[0110] In one embodiment, if Figure 4 As shown, step S104, based on the angle error to be corrected of the motor, inputs a correction step pulse and a correction micro-step pulse to the motor, including the following steps S402 to S406.

[0111] Step S402, obtaining the number of rotations of the motor for correction based on the angle error of the motor to be corrected.

[0112] It can be understood that the theoretical travel required for the large gear and the small gear to rotate is equal. For example, the number of revolutions of the motor can be set to M, and the travel of the gear connected to the driving wheel of the motor to rotate one revolution is , the number of motor rotations can be obtained according to the following formulas 3 and 4:

[0113] (Formula 3)

[0114] (Formula 4)

[0115] Among them, M is the number of revolutions of the motor, L is the theoretical rotation distance of the driving wheel and the driven wheel, The travel of the driven wheel gear rotating one circle, The gear of the driving wheel rotates one circle. is the rotation angle of the rotating component.

[0116] Optionally, the transmission device can use an HTD-3M synchronous belt with a tooth pitch of 3mm to realize the transmission between the above-mentioned driving wheel and the driven wheel. In this case, the travel of the driving wheel gear rotating one circle is , the travel of the driven wheel gear for one rotation is Based on the number of teeth on the driven wheel and the number of teeth on the driving wheel, the number of motor rotations can be expressed as follows:

[0117] (Formula 5)

[0118] in, is the rotation angle of the rotating component, is the number of teeth on the driven wheel, is the number of gear teeth on the driving wheel.

[0119] Optionally, the synchronous belt may be a synchronous belt having a cosine waveform tooth shape.

[0120] For example, in combination with the derivation of the above formulas 3 to 5, according to the motor angle error to be corrected, the following formula 6 can be obtained to calculate the number of motor correction rotations:

[0121] (Formula 6)

[0122] in, To calibrate the number of rotations of the motor, is the motor angle error to be corrected.

[0123] Step S404, based on the correction number of rotations of the motor, calculate the correction number of step pulses and the correction number of micro-step pulses.

[0124] It can be understood that one rotation of the motor is 360 degrees. When the motor rotates M circles, the required step pulse can be expressed as the following formula 7:

[0125] (Formula 7)

[0126] in, The step pulse required for the motor to rotate M circles. is the step angle of the Y-axis motor or the X-axis motor. Optionally, the step angle Ra includes 1.2 degrees.

[0127] Furthermore, when it is determined that the running angle error of the rotating component is entirely caused by the error of the transmission structure, the step pulses required to be inputted correspondingly can be obtained based on the rotation angle of the rotating component according to the following formula 8:

[0128] (Formula 8)

[0129] in, The step pulses required for the motor to rotate a specified number of times. It is the angle of rotation of the rotating component when the motor rotates M circles. is the number of teeth on the driven wheel, is the number of gear teeth of the driving wheel, The step angle corresponding to the step pulse input for the Y-axis motor or the X-axis motor.

[0130] It is understandable that in micro-step pulse technology, the precision can be further subdivided in a step angle to obtain the corresponding micro-step pulse microstep. For example, when the step angle of the motor is set to 1.2 degrees, if 64 micro-steps are subdivided, the travel angle of 1 micro-step pulse can be obtained to be 0.01875 degrees.

[0131] For example, when the motor needs to rotate a specified number of times, the micro-step pulse required to be input can be expressed as the following formula 9:

[0132] (Formula 9)

[0133] in, It is the micro-step pulse that needs to be input when the motor needs to rotate a specified number of times. It is the step pulse that needs to be input when the motor needs to rotate a specified number of times. Input step pulses to the Y-axis motor or X-axis motor to correspond to the step angle. is the travel angle of 1 microstep pulse.

[0134] Specifically, after obtaining the number of correction rotations of the motor according to the angle error to be corrected, the above formulas 6 to 9 can be combined to obtain the number of correction step pulses and correction micro-step pulses required to be input to the motor for the correction number of rotations of the rotating motor.

[0135] Step S406, based on the number of corrected step pulses and the number of corrected micro-step pulses, input a corresponding number of corrected step pulses and corrected micro-step pulses to the motor.

[0136] Specifically, the number of correction step pulses and correction micro-step pulses required to drive the motor to correct the error can be calculated according to the number of correction rotations of the motor, and the corresponding number of correction step pulses and correction micro-step pulses can be input to the motor.

[0137] In one embodiment, based on the correction number of motor rotations, the correction number of step pulses and the correction number of micro-step pulses are calculated, including the following steps S502 to S506.

[0138] Step S502, according to the number of rotations of the motor, the number of corrected step pulses is calculated based on the following formula 10:

[0139] (Formula 10)

[0140] in, To correct the number of step pulses, Ra is the pulse step angle of the correct step pulse, and M is the number of motor correction rotations.

[0141] The number of motor correction rotations is the number of rotations required to drive the motor to correct the angle error of the motor to be corrected. The correction step pulse is a pulse signal that can drive the motor to rotate a preset pulse step angle after being input into the motor. Optionally, the pulse step angle of the correction step pulse can include 1.2 degrees.

[0142] Specifically, the number of correction step pulses input into the motor required to correct the angle error to be corrected can be calculated based on the number of correction rotations of the motor and the pulse step angle of the correction step pulses.

[0143] Step S504: According to the pulse step angle and the preset micro-step subdivision accuracy, the micro-step pulse step angle is calculated based on the following formula:

[0144] (Formula 11)

[0145] in, To correct the microstep pulse step angle of the microstep pulse, Ra is the pulse step angle of the corrected step pulse, and count is the preset microstep subdivision accuracy.

[0146] It can be understood that the correction microstep pulse is a pulse signal that can drive the motor to rotate a preset microstep pulse step angle after being input into the motor. Exemplarily, the correction step pulse can be subdivided based on the preset microstep subdivision accuracy to obtain the corresponding correction microstep pulse. Optionally, the preset microstep subdivision accuracy can be set to 64, which can mean that the correction step pulse is subdivided into 64 microsteps. It should be noted that the setting method of the above-mentioned preset microstep subdivision accuracy is not limited to the implementation method mentioned in the above-mentioned embodiment. This application only exemplarily describes one possible implementation, and this application does not specifically limit the setting of the preset microstep subdivision accuracy.

[0147] Specifically, the micro-step pulse step angle can be calculated based on the pulse step angle of the correction step pulse and the preset micro-step subdivision accuracy.

[0148] Step S506, according to the correction step pulse number, pulse step angle and micro-step pulse step angle, the correction micro-step pulse number is calculated based on the following formula:

[0149] (Formula 12)

[0150] in, To correct the number of micro-step pulses, step is the number of corrected step pulses, To correct the pulse step angle of the step pulse, Qms is the micro-step pulse step angle, The value after the decimal point of step.

[0151] It is understood that after a specified number of correction motor pulses are input to the motor based on the number of correction motor rotations, there may still be a residual angle smaller than the pulse step angle of the correction step pulse that requires further compensation correction. Exemplarily, the residual angle error of this part of the pulse step angle smaller than the correction step pulse can be corrected by micro-step pulses.

[0152] Specifically, according to the obtained number of correction step pulses, the pulse step angle of the correction step pulse, and the step angle of the correction micro-step pulse, the number of correction micro-step pulses required when driving the motor to rotate the motor to correct the number of rotations can be calculated; by inputting the corresponding number of correction step pulses and correction micro-step pulses to the motor, the motor can be driven to rotate to a specified angle to correct the angle error of the motor to be corrected. By using the correction step pulse and the correction micro-step pulse, the relevant errors of the lamp can be smoothly corrected.

[0153] In one embodiment, after inputting a corresponding number of correction step pulses and correction micro-step pulses to the motor based on the correction step pulse number and the correction micro-step pulse number, the method further includes the following steps S602 to S608. Among them:

[0154] Step S602: Calculate the motor target step angle based on the following formula according to the corrected step pulse number and the corrected micro-step pulse number:

[0155] (Formula 13)

[0156] in, is the motor target step angle, To calibrate the number of step pulses, is the pulse step angle, To correct the number of microstep pulses, is the micro-step pulse step angle.

[0157] It can be understood that the target step angle is the angle that the motor should theoretically rotate and travel, calculated based on the corrected step pulse number and the corrected micro-step pulse number. For example, when the motor is operating normally, the actual rotation angle of the motor should be equal to the target step angle of the motor; when the motor angle error to be corrected is corrected by correcting the step pulse number and the corrected micro-step pulse number, the motor target step angle is substantially equal to the motor angle error to be corrected.

[0158] Specifically, the target step angle of the motor can be obtained based on the corrected step pulse number and the corrected micro-step pulse number (or the angle error of the motor to be corrected).

[0159] Step S604: Calculate the target compensation amount of the motor angle data based on the following formula 14 according to the target step angle of the motor:

[0160] (Formula 14)

[0161] in, is the motor target step angle, is the target compensation amount of the angle data, and Y is the number of resolution bits of the motor magnetic encoder.

[0162] It can be understood that the motor rotation angle needs to be calculated through the angle data it outputs (such as the SPI angle data of the Y position). The angle data target compensation amount represents the change in the angle data theoretically output by the motor magnetic encoder after the motor rotates the motor target step angle.

[0163] Specifically, based on the target step angle of the motor and the number of resolution bits of the motor magnetic encoder, the target compensation amount of the angle data of the motor can be calculated.

[0164] Step S606, according to the actual running angle of the motor before and after the angle error to be corrected is corrected, the actual compensation amount of the angle data of the motor is calculated based on the following formula 15:

[0165] (Formula 15)

[0166] in, is the actual compensation amount of the angle data, To correct the angle data output by the motor magnetic encoder after the motor angle error is corrected, It is the angle data output by the motor magnetic encoder before correcting the angle error to be corrected.

[0167] It can be understood that after inputting a specified number of correction step pulses and correction micro-step pulses into the motor, the angle data output by the motor magnetic encoder will generate a corresponding change. Exemplarily, the actual change in the angle data output by the motor magnetic encoder after the error correction can be characterized by the actual compensation amount of the angle data.

[0168] Specifically, the output angle data of the motor magnetic encoder before and after the angle error to be corrected of the motor is obtained, and based on the change of the output angle data before and after the error is corrected, the actual compensation amount of the angle data of the motor is obtained.

[0169] Step S608, responding to the actual compensation amount of the angle data Equal to the motor target step amount , confirm that the correction of the motor angle error to be corrected is completed.

[0170] It can be understood that if the actual compensation amount of the angle data Equal to the motor target step amount , it means that the input correction step pulse and correction micro-step pulse make the motor rotate to the specified angle required for error correction, which also shows that the motor is operating normally.

[0171] Specifically, the actual compensation amount of the angle data obtained by measurement and calculation and the motor target step amount Comparison: If the actual compensation amount of the angle data Equal to the motor target step amount , it means that the motor is running normally and the correction of the motor angle error to be corrected is completed. By comparing the actual compensation amount of the angle data of the motor magnetic encoder with the motor target step amount, the error correction process can be verified, which improves the accuracy and stability of the error correction.

[0172] In one embodiment, Figure 5 As shown, the present application also provides a lighting control method, which is applied to a stage lighting control system, the system includes a rotating component, a motor for driving the rotating component to rotate, a component magnetic encoder for measuring the actual operating angle of the rotating component, and a motor magnetic encoder for measuring the actual operating angle of the motor; the method includes the following steps S702 to S708. Among them:

[0173] Step S702, in response to being in the stage of starting up the lamp, if no lamp control data is received, it is determined whether there is power-off memory data.

[0174] Among them, the lamp body control data is used to control the movement of the rotating component to the target angle, and the power-off memory data includes the lamp body control data cached during the power-off stage. The power-off stage is the stage when the power output voltage gradually decreases to zero when the system was powered off and shut down last time.

[0175] Optionally, the stage lighting control system also includes an AD detection circuit; the AD detection circuit can be used to determine the lamp body control data of each channel that needs to be memorized as power-off memory data according to the change in the output voltage of the system switching power supply. Exemplarily, the lamp body control data may include DMX512 data of each control channel of the system. Exemplarily, the data frame of DMX512 data corresponds to 512 address codes, and 1 data frame contains 1 low-level start bit, 8 data bits, and 2 high-level stop bits; wherein the 8 data bits correspond to the control channel value 0-255, that is, the DMX512 data value.

[0176] For example, if it is determined that the light control data of each channel needs to be memorized, the DMX512 data values ​​of each channel in the system's serial port buffer buff can be saved to store as power-off memory data; when the stage lighting control system is powered off and restarted, it will continue to run the DMX512 data of each channel before the power off (i.e., the power-off memory data).

[0177] In some possible implementations, the light control data may come from a lighting console connected to a stage lighting control system, and the lighting console may be used to edit the lighting motion program and send the corresponding light control data to drive the stage lighting to complete the specified action. For example, when a lighting engineer edits and runs the "light show" program through the lighting console, the lighting console will output the corresponding DMX512 data.

[0178] Specifically, when the system is in the stage of starting up the lamp, if the lamp body control data for controlling the lamp to complete the specified action is not received, the judgment on whether there is power-off memory data is started.

[0179] Step S704: if there is power-off memory data and the power-off memory data is a fixed value, then based on the light projection distance of the lamp, a correction reference data for correcting the angle error of the rotating component is determined.

[0180] It should be noted that when the power-off memory data is a fixed value, it means that the lamp needs to move to a fixed angle according to the lamp body control data; when the power-off memory data is not a fixed value, it means that the lamp needs to perform a dynamic performance process (such as back and forth movement) according to the lamp body control data.

[0181] It can be understood that if the power-off memory data is a fixed value, it means that the light of the lamp will be projected at a fixed angle; according to the installation position of the lamp and the power-off memory data, the projection distance of the light can be determined. Furthermore, in the case of close-range projection of the light of the lamp, the light spot of the light is very small. At this time, the light projection deviation caused by the error of the lamp running angle will be relatively small and difficult to be discovered; however, in the case of long-range projection of the lamp tube, according to the correlation between angle and distance, this light projection deviation will be relatively large and easy to be discovered.

[0182] For example, when the component magnetic encoder and the motor magnetic encoder use different bit numbers, the minimum detection deviation angles of the two encoders will also be different. It can be understood that the smaller the minimum detection deviation angle of the magnetic encoder, the higher the motor angle measurement accuracy will be, and thus the detection accuracy of the actual operating angle error of the rotating component will be higher. For example, when the motor magnetic encoder of the Y axis is a 10-bit magnetic encoder, its minimum deviation angle is 360 / 2 10 ≈0.35 degrees, corresponding to the minimum error angle of the Y-axis rotating component that can be corrected is (360 / 2 10 ) / (N1 / N2)=(360 / 2 10 )*(N2 / N1)=(360 / 2 10 )*(14 / 78)≈0.0631 degrees; where N2 / N1=14 / 78 is the transmission ratio between the motor and the rotating member.

[0183] Optionally, based on the light projection distance of the lamp, the correction reference data for correcting the angle error of the rotating component is determined, including: if the light beam projection distance of the lamp meets the preset distance threshold condition, the output angle data of the lamp body magnetic encoder or the motor encoder can be selected as the correction reference data for correcting the angle error of the rotating component according to the minimum detection deviation angle. Through the above technical means, the accuracy of the angle error correction can be improved.

[0184] Specifically, when it is determined that the power-off memory data exists and the power-off memory data is a fixed value, correction reference data for correcting the angle error of the rotating member may be determined based on the light projection distance of the lamp.

[0185] Step S706: If there is power-off memory data and the power-off memory data is not a fixed value, the rotating component is driven to rotate by the motor based on the power-off memory data.

[0186] It can be understood that when power-off memory data exists and the power-off memory data is not a fixed value, the lamp needs to perform corresponding lamp body movements according to the stored power-off memory data, such as controlling the lamp body to execute the remaining actions in the "light show" program that were not completed before the last power outage.

[0187] Specifically, according to the stored power-off memory data which is not a fixed value, the rotating member can be driven to perform a corresponding rotation action.

[0188] Step S708, when it is determined that the rotation direction of the rotating member has changed, in response to the actual operating angle of the rotating member not being equal to the target operating angle of the rotating member, the rotating member is driven to move to the target operating angle of the rotating member based on the lamp calibration method described in the above method embodiment.

[0189] Exemplarily, the actual operating angle of the current rotating component (i.e., the actual operating angle of the lamp body in the Y-axis direction or the main shaft of the lamp in the X-direction) can be measured by a component encoder. It can be understood that when the actual operating angle of the rotating component is not equal to the target operating angle of the rotating component, it means that the rotating component may have accumulated mechanical errors due to long-term back-and-forth operation, resulting in a corresponding rotating component operating angle error. Further, according to the lamp correction method described in the above embodiment, based on the rotating component operating angle error, the corresponding motor angle error to be corrected can be obtained. Optionally, the motor angle error to be corrected can be corrected by inputting a correction step pulse and a correction micro-step pulse into the motor, thereby finally correcting the rotating component operating angle error.

[0190] Specifically, when the rotating member performs corresponding lamp body movement according to the power-off memory data, when the rotation direction of the rotating member changes, the lamp correction method described in any one of the above method embodiments can be used to drive the rotating member to move to the target operating angle of the rotating member to correct the operating angle error of the rotating member. The above lamp control method can realize autonomous error correction during the operation of the lamp, thereby improving the operating stability of the stage lamp and the accuracy of light projection.

[0191] In one possible implementation, the lamp control method further includes: in response to being in the lamp power-on startup phase, if lamp body control data is received, executing the step of determining the correction reference data for correcting the angle error of the rotating component based on the light projection distance of the lamp as described in the above method embodiment, and rotating the rotating component to a specified angle according to the lamp body control data.

[0192] In a possible implementation, after step S702, determining whether there is power-off memory data, the following steps S802 to S804 are also included. Among them:

[0193] Step S802: If there is no power-off memory data, the motor is used to drive the rotating component to move to a reference reset angle; wherein the reference reset angle includes a middle value of the rotation angle range of the lamp body.

[0194] It can be understood that when there is no power-off memory data and no lamp control data is received, the rotating component temporarily has no specified target angle to be rotated to. At this time, a reset operation can be performed to eliminate the mechanical errors accumulated from the previous operation of the lamp.

[0195] Optionally, the rotating member in the Y-axis direction (the lamp body in the Y-axis direction) can select 90 degrees as the reference reset angle in the Y-axis direction, that is, when resetting, the Y-axis lamp body is perpendicular to the horizontal plane (refer to Figure 2 As shown). Further, the rotatable angle range of the rotating member in the Y-axis direction may include (90, 225] and [315, 359] & [0, 90].

[0196] Optionally, the X-axis rotating member (the main axis of the lamp in the X-axis direction) can select 270 degrees as the reference reset angle in the X-axis direction, that is, when resetting, the X-axis rotating member is perpendicular to the handle of the lamp base (refer to Figure 2 As shown). Further, the rotatable angle range of the rotating member in the X-axis direction may include [0, 180], (180, 270], (270, 360] and (360, 540].

[0197] Specifically, when there is no power-off memory data, the rotating member of the lamp can be reset, that is, the rotating member is driven by the motor to move to the reference reset angle. In this way, the function of collision-free reset of the lamp can be achieved.

[0198] Step S804: in response to the actual reset angle not being equal to the reference reset angle, correcting the reset angle error based on the actual reset angle of the lamp body and the reference reset angle of the lamp body.

[0199] The actual reset angle is the actual rotation angle reached by the rotating component during the reset process, which can be measured by the component magnetic encoder. When the actual reset angle is not equal to the reference reset angle, the rotating component has a reset angle error, and the reset angle error is the difference between the actual reset angle and the reference reset angle. It can be understood that the actual reset angle is essentially the actual operating angle of the rotating component described in the above-mentioned lamp calibration method, and the reference reset angle is essentially the target operating angle of the rotating component in the above-mentioned lamp calibration method.

[0200] Exemplarily, based on the actual reset angle of the lamp body and the reference reset angle of the lamp body, the lamp correction method described in any one of the above method embodiments is used to drive the rotating component to move to the reference reset angle to correct the reset angle error.

[0201] Specifically, when the actual reset angle is not equal to the reference reset angle, the reset angle error can be corrected by the lamp calibration method described in any one of the above method embodiments according to the actual reset angle of the lamp body and the reference reset angle of the lamp body.

[0202] In a possible implementation, the lamp control method further includes the following steps S902 to S908, wherein:

[0203] Step S902, in response to being in the lighting performance stage, determining the light beam projection distance according to the received lamp body control data.

[0204] Among them, the lighting performance stage is the stage where the lighting engineer edits the program on the lighting console to control the lighting fixture to project the light to the specified position. During the lighting performance stage, the lighting fixture can receive the light body control data from the lighting console.

[0205] Specifically, after receiving the lamp body control data, the light beam projection distance is determined by parsing the lamp body control data.

[0206] Step S904: determining calibration reference data for calibrating the angular error of the rotating component based on the light beam projection distance.

[0207] Specifically, the step of determining the correction reference data for correcting the angle error of the rotating component based on the light projection distance of the lamp in the above method embodiment can be performed according to the calculated light beam projection distance.

[0208] Step S906: Based on the lamp body control data, the rotating member is driven by the motor to rotate to the target operating angle of the rotating member.

[0209] Specifically, by analyzing the lamp body control data, the rotating component of the lamp can be moved from the current rotation angle to the target operating angle of the rotating component.

[0210] Step S908, when the rotation direction of the rotating member changes, in response to the actual operating angle of the rotating member not being equal to the target operating angle of the rotating member, the rotating member is driven to move to the target operating angle of the rotating member based on the lamp calibration method described in the above method embodiment to correct the operating angle error of the rotating member.

[0211] Specifically, when the rotating member moves back and forth according to the lamp body control data, if the actual operating angle of the rotating member is not equal to the target operating angle of the rotating member, it means that there is an operating angle error of the rotating member at this time. At this time, the operating angle error of the rotating member can be corrected by the lamp correction method described in the above method embodiment. Through the above method, it can be achieved that during the lamp performance, the accumulated mechanical errors can also be corrected autonomously, thereby improving the intelligence level and operation accuracy of the stage lamp.

[0212] In a possible implementation, an error correction timing for correcting an operating angle error of a rotating component is determined based on an operating mode of the motor.

[0213] The running modes of the motor include a slow running mode and a fast running mode.

[0214] Specifically, based on the operation mode of the motor, determining the error correction timing for correcting the accumulated angle error of the lamp body includes the following steps: if the motor is in a slow operation mode, determining the error correction timing as when the running direction of the motor changes; if the motor is in a fast operation mode, determining the error correction timing as after the motor stops for a preset time. In this way, in scenarios where the motor needs to run quickly, the frequency of the lamp's autonomous error correction can be reduced; when there is no need for the motor to run quickly, the frequency of autonomous error correction can be increased, thereby enabling the lamp to adaptively adjust the timing and frequency of error correction according to different application scenarios, thereby improving the intelligence of stage lamps and ensuring the accuracy of stage lamp operation. The present application enables the lamp to adaptively use different error correction methods to autonomously correct lamp body deviations according to different usage scenarios.

[0215] In order to further explain the solution of the present application, a specific example is given below. Taking the example of a lamp performing a back-and-forth "light show" program in the lamp performance stage, the specific implementation process is as follows:

[0216] First, according to the DMX512 data sent by the lighting control console received by the stage lighting control system MCU, the rotating component is driven to run back and forth, and the mechanical error generated by the lighting fixture is corrected when the rotation angle of the rotating component changes. For example, the component magnetic encoder uses a 10-bit magnetic encoder to measure the rotation angle.

[0217] Before the motor runs the program, the binary angle data measured and output by the component magnetic encoder is 1100000000, which is converted into the corresponding decimal number D as 768, indicating that the angle of the rotating component at this time is Qn=(360 / 1024)*768=270 degrees. At this time, the actual running angle of the rotating component is equal to the target running angle of the rotating component, and there is no need to correct the angle deviation through the motor.

[0218] When the rotating member is driven to rotate from 270 degrees to 540 degrees, the angle data measured and output by the member magnetic encoder is 1000000000, which is converted to a decimal number D of 512. The decimal number D corresponds to a rotation angle of Qn=(360 / 1024)*512=180. At this time, a low-level Hall signal output by the member magnetic encoder can also be detected, indicating that the rotating member is in a ring state at this time. The ring state indicates that the running angle of the rotating member exceeds one circle (that is, exceeds 360 degrees), so the actual running angle data of the rotating member is Qn=180+360=540 degrees. At this time, the actual running angle of the rotating member is equal to the target running angle of the rotating member, and there is no need to correct the angle deviation of the rotating member through the motor.

[0219] When the rotating component rotates from 540 degrees to 0 degrees, the angle data measured and output by the component magnetic encoder is 0000000000, which is converted to a decimal number D of 0. Therefore, it can be known that the actual operating angle data of the rotating component at this time is Qn=(360 / 1024)*0=0. The actual operating angle of the rotating component is equal to the target operating angle of the rotating component, and there is no need to correct the angle deviation of the rotating component through the motor.

[0220] When the rotating component rotates from 0 degrees to 120 degrees, the angle data measured and output by the component magnetic encoder is 0101010110, which is converted into a decimal number D of 342. Therefore, the actual operating angle data of the rotating component is Qn=(360 / 1024)*342=120.23 degrees. At this time, the actual operating angle of the rotating component is not equal to the target operating angle of the rotating component, indicating that the lamp has a mechanical error, that is, the operating angle error of the rotating component.

[0221] At this time, it can be calculated that the running angle error of the rotating component △Q=120.23-120=0.23 degrees. The motor step pulse required for the mechanical error of the lamp body. Based on the running angle error of the rotating component, the lamp correction method described in any one of the above method embodiments is used to obtain the correction step pulse and correction micro-step pulse required to correct the running angle error of the rotating component. By inputting the above correction step pulse and correction micro-step pulse to the motor, the rotating component is driven to move to the target running angle of the rotating component to achieve the correction of the running angle error of the rotating component △Q.

[0222] After the error correction is completed, the rotating component is driven to rotate from 120 degrees to 0 degrees. The angle data measured and output by the component magnetic encoder is 0000000000, which is converted to a decimal number D of 0. Therefore, the actual running angle data of the rotating component is Qn=(360 / 1024)*0=0. At this time, the actual running angle of the rotating component is equal to the target running angle of the rotating component, and there is no need to correct the angle deviation through the motor.

[0223] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0224] Based on the same inventive concept, the embodiment of the present application also provides a lamp calibration device for implementing the lamp calibration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more lamp calibration device embodiments provided below can refer to the limitations of the lamp calibration method above, and will not be repeated here.

[0225] In an exemplary embodiment, Figure 6 As shown, the present application also provides a lamp calibration device 600, which is applied to a stage lamp control system. The system includes a rotating component, a motor for driving the rotating component to rotate, and a component magnetic encoder; the device 600 includes:

[0226] Angle error acquisition module 602, used to acquire the motor angle error to be corrected based on the target operating angle of the rotating component and the actual operating angle of the rotating component; wherein the actual operating angle of the rotating component is measured by the component magnetic encoder;

[0227] The angle error correction module 604 is used to input correction step pulses and correction micro-step pulses to the motor based on the angle error to be corrected of the motor, so as to drive the rotating component to move to the target operating angle of the rotating component.

[0228] In one embodiment, the system also includes a motor magnetic encoder for measuring the actual operating angle of the motor; the angle error acquisition module 602 is also used to: obtain the rotating component operating angle error based on the rotating component target operating angle and the rotating component actual operating angle; obtain the motor operating angle error based on the motor target operating angle and the motor actual operating angle; obtain the motor angle error to be corrected based on the motor operating angle error, the rotating component operating angle error and the transmission ratio between the motor and the rotating component.

[0229] In one embodiment, the angle error correction module 604 is also used to: obtain the number of correction rotations of the motor based on the angle error to be corrected of the motor; calculate the number of correction step pulses and the number of correction micro-step pulses based on the number of correction rotations of the motor; and input a corresponding number of correction step pulses and correction micro-step pulses to the motor based on the number of correction step pulses and the number of correction micro-step pulses.

[0230] In one embodiment, the angle error correction module 604 is further configured to:

[0231] According to the number of corrected motor rotations, the number of corrected step pulses is calculated based on Formula 7 in the above embodiment; according to the pulse step angle and the preset micro-step subdivision accuracy, the micro-step pulse step angle is calculated based on Formula 11 in the above embodiment;

[0232] According to the correction step pulse number, the pulse step angle and the micro-step pulse step angle, the correction micro-step pulse number is calculated based on formula 12 in the above embodiment.

[0233] In one embodiment, the angle error correction module 604 is further configured to:

[0234] According to the correction step pulse number and the correction micro-step pulse number, the motor target step angle is calculated based on formula 13 in the above embodiment;

[0235] According to the target step angle of the motor, the target compensation amount of the angle data of the motor is calculated based on Formula 14 in the above embodiment;

[0236] According to the actual running angle of the motor before and after the angle error to be corrected of the motor is corrected, the actual compensation amount of the angle data of the motor is calculated based on formula 15 in the above embodiment;

[0237] Actual compensation amount in response to angle data Equal to the motor target step amount , confirm that the correction of the motor angle error to be corrected is completed.

[0238] Each module in the above-mentioned lamp calibration device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0239] In one embodiment, the present application further provides a stage lighting control system 700, the system 700 comprising:

[0240] The rotating member 701 includes a lamp body or a main shaft of the lamp, and the lamp body includes at least one light source, and the light source is used to generate a light beam;

[0241] The driving wheel 703 and the driven wheel 705, the driving wheel 703 is connected to the driven wheel 705 through a synchronous belt (not shown in the figure), the driven wheel 705 is connected to the rotating member 701, and the driving wheel 703 drives the driven wheel 705 through the synchronous belt to drive the rotating member 701 to rotate to a target angle;

[0242] The motor 707 is connected to the motor shaft of the driving wheel 703, and the motor 707 is used to drive the driving wheel 703 to rotate, so as to control the rotating member 701 to move to a target angle;

[0243] A component magnetic encoder 709, which is connected to the rotating component 701 and is used to measure the actual rotation angle of the rotating component 701;

[0244] A motor magnetic encoder 711, the motor magnetic encoder 711 is connected to the motor 707 and is used to measure the actual rotation angle of the motor 707;

[0245] The control module 713 is connected to the motor 707, the component magnetic encoder 709 and the motor magnetic encoder 711 respectively, and the control module 713 is used to execute the steps of any one of the methods in the above method embodiments.

[0246] Optionally, the control module 713 may adopt an MCU; wherein the MCU may be connected to the MCU100 bit of the circuit board (ie, the console display panel).

[0247] In one embodiment, the present application further provides a stage lighting fixture, including the stage lighting fixture control system in the above embodiment.

[0248] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0249] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0250] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0251] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0252] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0253] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A lamp calibration method, characterized in that: The method is applied to a stage lighting control system, the system comprising a rotating component, a motor for driving the rotating component to rotate, and a component magnetic encoder; the method comprises: Based on the target operating angle of the rotating component and the actual operating angle of the rotating component, the angle error of the motor to be corrected is obtained; wherein the actual operating angle of the rotating component is measured by the magnetic encoder of the component; Based on the to-be-corrected angle error of the motor, a correction step pulse and a correction micro-step pulse are input to the motor to drive the rotating member to move to the target operating angle of the rotating member.

2. The method according to claim 1, characterized in that The system also includes a motor magnetic encoder for measuring the actual operating angle of the motor; The step of obtaining the angle error to be corrected of the motor based on the target operating angle of the rotating component and the actual operating angle of the rotating component comprises: Obtaining a rotating component operating angle error according to the rotating component target operating angle and the rotating component actual operating angle; Obtaining a motor operating angle error according to a motor target operating angle and the motor actual operating angle; The to-be-corrected angle error of the motor is obtained based on the running angle error of the motor, the running angle error of the rotating member, and the transmission ratio between the motor and the rotating member.

3. The method according to claim 2, characterized in that The step of inputting a correction step pulse and a correction micro-step pulse to the motor based on the angle error to be corrected of the motor comprises: Based on the angle error to be corrected of the motor, obtaining the number of rotations of the motor for correction; Based on the correction rotation number of the motor, the correction step pulse number and the correction micro-step pulse number are calculated; Based on the correction step pulse number and the correction micro-step pulse number, a corresponding number of the correction step pulses and the correction micro-step pulses are input to the motor.

4. The method according to claim 3, characterized in that: The step of calculating the corrected step pulse number and the corrected micro-step pulse number based on the corrected number of rotations of the motor comprises: According to the correction rotation number of the motor, the correction step pulse number is calculated based on the following formula: in, is the number of correction step pulses, Ra is the pulse step angle of the correction step pulse, and M is the number of correction rotations of the motor; According to the pulse step angle and the preset micro-step subdivision accuracy, the micro-step pulse step angle is calculated based on the following formula: in, is the micro-step pulse step angle of the correction micro-step pulse, Ra is the pulse step angle of the correction step pulse, and count is the preset micro-step subdivision accuracy; According to the correction step pulse number, the pulse step angle and the micro-step pulse step angle, the correction micro-step pulse number is calculated based on the following formula: in, is the number of micro-step pulses for correction, step is the number of step pulses for correction, is the pulse step angle, Qms is the micro-step pulse step angle, The value after the decimal point of step.

5. The method according to claim 4, characterized in that After inputting a corresponding number of the correction step pulses and the correction micro-step pulses to the motor based on the correction step pulse number and the correction micro-step pulse number, the method further includes: According to the corrected step pulse number and the corrected micro-step pulse number, the motor target step angle is calculated based on the following formula: in, is the target step angle of the motor, is the correction step pulse number, is the pulse step angle, is the correction micro-step pulse number, is the micro-step pulse step angle; According to the motor target step angle, the motor angle data target compensation amount is calculated based on the following formula: in, is the target step angle of the motor, is the target compensation amount of the angle data, and Y is the number of resolution bits of the motor magnetic encoder; According to the actual running angle of the motor before and after the correction of the angle error to be corrected of the motor, the actual compensation amount of the angle data of the motor is calculated based on the following formula: in, is the actual compensation amount of the angle data, To correct the angle data output by the motor magnetic encoder after the motor angle error to be corrected, Angle data output by the motor magnetic encoder before correcting the angle error to be corrected of the motor; The actual compensation amount in response to the angle data Equal to the motor target step amount , determine that the correction of the angle error of the motor to be corrected is completed.

6. A lamp control method, characterized in that: The method is applied to a stage lighting control system, the system comprising a rotating component, a motor for driving the rotating component to rotate, a component magnetic encoder for measuring an actual operating angle of the rotating component, and a motor magnetic encoder for measuring an actual operating angle of the motor; the method comprises: In response to being in the stage of starting up the lamp, if no lamp body control data is received, it is determined whether there is power-off memory data; wherein the lamp body control data is used to control the rotation member to move to a target angle, and the power-off memory data includes the lamp body control data cached during the power-off stage, and the power-off stage is the stage in which the power supply output voltage gradually decreases to zero when the system was powered off and shut down last time; If the power-off memory data exists and the power-off memory data is a fixed value, then determining correction reference data for correcting the angle error of the rotating component based on the light projection distance of the lamp; If the power-off memory data exists and the power-off memory data is not a fixed value, the rotating member is driven to rotate by the motor based on the power-off memory data; When it is determined that the rotation direction of the rotating member has changed, in response to the actual operating angle of the rotating member not being equal to the target operating angle of the rotating member, the rotating member is driven to move to the target operating angle of the rotating member based on the lamp calibration method according to any one of claims 1 to 5.

7. The method according to claim 6, characterized in that After determining whether there is power-off memory data, the method further includes: If the power-off memory data does not exist, the motor drives the rotating member to move to a reference reset angle, so as to obtain an actual reset angle of the rotating member through the rotating member magnetic encoder; the reference reset angle includes a middle value of the rotation angle range of the rotating member; In response to the actual reset angle of the rotating member not being equal to the reference reset angle, the rotating member is driven to move to the reference reset angle based on the lamp calibration method according to any one of claims 1 to 5.

8. A lamp calibration device, characterized in that: The device is applied to a stage lighting control system, the system comprising a rotating component, a motor for driving the rotating component to rotate, a component magnetic encoder for measuring the actual operating angle of the rotating component, and a motor magnetic encoder for measuring the actual operating angle of the motor; the device comprises: An angle error acquisition module, used for acquiring an angle error to be corrected of the motor based on the output angle data of the component magnetic encoder and / or the motor magnetic encoder; The angle error correction module is used to input a correction step pulse and a correction micro-step pulse to the motor based on the angle error to be corrected of the motor, so as to drive the rotating component to move to a target operating angle of the rotating component.

9. A stage lighting control system, characterized in that: The system comprises: A rotating member, wherein the rotating member comprises a lamp body or a main shaft of the lamp, wherein the lamp body comprises at least one light source, and the light source is used to generate a light beam; A driving wheel and a driven wheel, wherein the driving wheel is connected to the driven wheel through a synchronous belt, and the driven wheel is connected to the rotating member, and the driving wheel drives the driven wheel through the synchronous belt to drive the rotating member to rotate to a target angle; A motor, the motor being connected to the motor shaft of the driving wheel, the motor being used to drive the driving wheel to rotate so as to control the rotating member to move to a target angle; A component magnetic encoder, the component magnetic encoder is connected to the rotating component and is used to measure the actual rotation angle of the rotating component; A motor magnetic encoder, the motor magnetic encoder is connected to the motor and is used to measure the actual rotation angle of the motor; A control module is respectively connected to the motor, the component magnetic encoder and the motor magnetic encoder, and the control module is used to execute the steps of the method described in any one of claims 1-7.

10. A stage lighting fixture, characterized in that: Including the stage lighting control system as described in claim 9.