Alpaca-PMAC bridging communication-based horizon astronomical telescope image field racemization control method

By using the Alpaca–PMAC bridging communication method, image field despinning control of altazimuth telescopes was realized, solving the problem of connecting the PMAC controller and the Alpaca protocol. This achieved high-precision, stable, and real-time image field despinning control and simplified system integration.

CN121634504APending Publication Date: 2026-03-10NANJING INST OF ASTRONOMICAL OPTICS & TECH NAT ASTRONOMICAL OBSE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The lack of a standardized interface mechanism between the PMAC controller and the Alpaca protocol in the existing technology makes it difficult for altazimuth telescopes to achieve plug-and-play operation in image field despin control, which increases the complexity of system integration and affects observation accuracy and stability.

Method used

An Alpaca–PMAC bridging communication method is provided. By setting a compatible communication endpoint on the bridging server, ASCOM/Alpaca protocol commands are mapped into motion control semantics that the PMAC controller can recognize. Combined with position angle calculation and amplitude limiting control, image field derotation control is realized, and system stability is ensured through closed-loop error compensation and safety gating.

Benefits of technology

It achieves plug-and-play, real-time, and highly stable image field despinning control for altazimuth telescopes within the ASCOM ecosystem, reducing system integration complexity and deployment and maintenance costs, and ensuring high-precision observation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121634504A_ABST
    Figure CN121634504A_ABST
Patent Text Reader

Abstract

The invention discloses a horizon type astronomical telescope image field racemization control method based on Alpaca-PMAC bridging communication. According to the method, a communication endpoint compatible with an ASCOM / Alpaca protocol is arranged on a bridging server, and a received instruction is mapped into motion control semantics capable of being recognized by a PMAC controller; generating a time-varying target position sequence; the sequence is continuously expanded, subjected to speed, step length, acceleration amplitude limiting and time synchronization processing and then converted into a motor position count value of a PMAC controller, and the motor position count value is written into a corresponding register through a memory mapping mechanism to serve as a target position instruction, so that image field rotation compensation control is achieved. According to the invention, organic fusion of feed-forward trajectory generation and feedback correction is realized, and high-precision, high-reliability and high-real-time horizon astronomical telescope image field racemization control can be realized in an ASCOM ecological environment without changing an existing client and a main program of a controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of astronomical observation equipment control, specifically to a universal bridging communication method between an ASCOM / Alpaca protocol and a PMAC controller, and image field despinning control of a horizontal astronomical telescope implemented based on this bridging, belonging to the field of precision servo control and networked telescope control technology. Background Technology

[0002] ASCOM / Alpaca is a widely adopted device communication standard in the current astronomical observation software ecosystem, providing a unified interface for devices such as telescopes, cameras, and guide scopes. Meanwhile, the PMAC (Programmable Multi-Axis Controller) series of controllers is widely used in industrial and scientific fields due to its strong real-time performance and outstanding multi-axis coordinated control capabilities. However, the lack of a standardized interface mechanism between PMAC controllers and the Alpaca protocol makes plug-and-play interoperability difficult to achieve within the astronomical equipment ecosystem.

[0003] Altazimuth telescopes use two axes—azimuth and altitude—for celestial object tracking. Because this coordinate system is not equatorial, while the optical axis remains constant during tracking, the image field rotates over time, a phenomenon known as "image field rotation." In long-exposure imaging or high-precision spectroscopic observations, failure to derotate the image field will result in blurred images or spectral line drift, severely impacting the observation results. Therefore, real-time compensation is required through an image field derotator. Derotation control must meet the following requirements:

[0004] Existing solutions often rely on proprietary communication protocols from specific controller manufacturers or require separate development of independent programs on the host computer, lacking standardized integration with the ASCOM / Alpaca ecosystem. This not only increases the complexity of system integration but also makes it difficult to form a reliable control link for continuous tracking, amplitude limiting control, and safety gating. Therefore, developing an image field despinning control scheme oriented towards the Alpaca standard and capable of working in conjunction with PMAC controllers has significant engineering implications and application value. Summary of the Invention

[0005] The purpose of this invention is to provide a universal Alpaca–PMAC bridging communication method that enables image field derotation control without modifying the ASCOM client and PMAC controller main program. It also integrates key logic such as position angle calculation, continuous tracking, angular velocity / acceleration / step size limiting and feedback correction into the same bridging link to ensure interoperability, real-time performance, stability and security.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] This invention provides a method for despin control of the image field of a horizontal astronomical telescope based on Alpaca-PMAC bridging communication, comprising the following steps:

[0008] Step 1: Set up a communication endpoint compatible with the ASCOM / Alpaca protocol on the Alpaca–PMAC bridging server to receive instructions from the ASCOM / Alpaca client. These instructions include, but are not limited to, connection, site geographic coordinate setting, UTC time setting, target pointing, synchronization, tracking, and status reading instructions. Map the instructions from each ASCOM / Alpaca telescope endpoint to motion control semantics recognizable by the PMAC controller, and establish the correspondence between endpoint-control semantics and PMAC memory mapping variables.

[0009] Step 2: Calculate the local sidereal time based on the site geographic coordinates and UTC time information obtained from the ASCOM / Alpaca client by the Alpaca-PMAC bridging server. Combine this with the target's right ascension and declination parameters to obtain the theoretical position angle of the image field. Calculate the change in the theoretical position angle between two adjacent moments within each control cycle. Add the zero-offset angle to the theoretical position angle to obtain the actual position angle, and form a target position angle sequence that changes over time according to the control cycle. Continuously expand the target position angle sequence with reference to the command angle issued in the previous cycle to avoid 0 / 360° jumps. Apply limits to the single-step angle increment, angular velocity, and angular acceleration for each cycle. Simultaneously, perform time synchronization processing on the calculation results based on an external unified clock.

[0010] Step 3: According to the pre-calibrated proportional relationship between the derotation actuator angle and the encoder count, the target position angle sequence obtained in Step 2 is converted into the target position count value of the derotation axis of the PMAC controller. The Alpaca-PMAC bridge server writes the target position count value into the corresponding register or P variable through the mapping interface with PMAC shared memory, and calls the Jog position command or equivalent motion command to make the derotation actuator follow the target position count in closed-loop mode, thereby realizing image field rotation compensation control.

[0011] Furthermore, the method also includes:

[0012] Step 4: Periodically read the actual position count and related status words of the derotating shaft encoder in the PMAC controller, convert them into actual position angles, compare them with the target position angle to obtain the tracking error, and perform closed-loop error compensation on the target position angle sequence according to the preset strategy; at the same time, perform boundary detection on the actual position angle, angular velocity, and angular acceleration, and when it is predicted that the trajectory may cross the boundary or violate safety constraints in the next few control cycles, prevent the issuance of new motion commands to the PMAC controller or trigger deceleration and stop in advance; when a manual stop command is received or an abnormal state is detected, stop the derotating control through the gating variable and maintain the state retrieval; the Alpaca-PMAC bridge server encapsulates the above execution results and safety gating status into an Alpaca response and returns it to the ASCOM / Alpaca client.

[0013] Furthermore, in step 1, the Alpaca–PMAC bridging server maps the parameter fields of each ASCOM / Alpaca telescope endpoint to variable read / write, macro instructions, or motion instructions of the PMAC controller, establishing a one-to-one correspondence between endpoints, control semantics, and P variables and motor state quantities in the PMAC shared memory.

[0014] Furthermore, in step 1, the Alpaca-PMAC bridging server provides both synchronous and asynchronous control modes. In asynchronous control mode, the Alpaca-PMAC bridging server maintains the current target state and the actual state through an internal state machine. Under the condition of meeting the preset speed, acceleration and single-step angle step size limits, it gradually approaches the target position according to the control cycle, and automatically ends the asynchronous pointing when the termination threshold is reached.

[0015] Furthermore, the theoretical position angle mentioned in step 2 is calculated from the station's geographical latitude, local sidereal time, and the target's right ascension and declination. The actual position angle is the result of adding the theoretical position angle to the zero-position offset angle. When the target position angle sequence is expanded, the command angle output in the previous control cycle is used as a reference. Among all equivalent solutions that differ by an integer multiple of 360°, the solution with the smallest difference from the command angle is selected to obtain a time-continuous target position angle sequence.

[0016] Furthermore, the limiting in step 2 includes updating the maximum angle step size, the maximum following angular velocity, and the maximum acceleration in a single operation, and performing time synchronization of the target position angle sequence based on an external clock.

[0017] Furthermore, in step 3, the proportional relationship is preferentially provided by the angle coefficient in the PMAC motor parameters, which is written by the Alpaca–PMAC bridging server when not configured.

[0018] Furthermore, in step 4, the boundary detection prevents the issuance of motion commands to the PMAC controller while maintaining the operation of the feedforward trajectory generation and feedback verification link.

[0019] The present invention also provides a despinning control system for an image field of a horizontal astronomical telescope, comprising an ASCOM / Alpaca client, an Alpaca–PMAC bridging server, a PMAC controller, a despinning actuator, and an encoder; wherein the Alpaca–PMAC bridging server is used to execute the method described in any one of claims 1 to 8.

[0020] The present invention also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the method described in any one of claims 1 to 8.

[0021] Compared with the prior art, the beneficial effects of the present invention are:

[0022] (1) Plug-and-play interoperability: A one-to-one mapping between ASCOM / Alpaca endpoints and PMAC control statements is established on the bridging server. The image field derotation function can be accessed without changing the existing client and PMAC main program, resulting in low deployment and maintenance costs. The bridging server directly adopts the Alpaca telescope interface specification published by the ASCOM organization. It is compatible with existing ASCOM / Alpaca client software and achieves motion control through the variable and macro instruction interface published by the PMAC controller. This allows altazimuth telescopes from different manufacturers to reuse the image field derotation method of this invention by configuring the endpoints and scale factors.

[0023] (2) Higher real-time performance and determinism: The target count is directly written into the controller register by memory mapping and executed in conjunction with real-time motion instructions, avoiding additional command parsing, significantly reducing instruction latency, and improving time alignment within the cycle.

[0024] (3) High precision and high reliability: The position angle driven feedforward trajectory is combined with step limit / speed limit and continuous tracking, and the encoder closed-loop error compensation and multi-level safety gating (trajectory prediction calculation / manual stop / boundary protection, etc.) ensure trajectory smoothness and system stability, realizing high-precision image field rotation compensation of the altazimuth telescope. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the system architecture and control link / data flow;

[0026] Figure 2 This is a schematic diagram illustrating communication timing, time synchronization, and transaction alignment.

[0027] Figure 3 This is a schematic diagram illustrating the mapping between Alpaca endpoints and PMAC control semantics.

[0028] Figure 4 Here is a flowchart of the image field despin calculation and execution process;

[0029] Figure 5 Example of interoperability with the ASCOM ecosystem (screenshot of device connection test). Detailed Implementation

[0030] The present invention will now be described in further detail with reference to the accompanying drawings.

[0031] System overall and data path such as Figure 1 As shown, the system includes an ASCOM / Alpaca client, an Alpaca-PMAC bridging server, a PMAC controller, a derotating actuator, and an encoder. The client communicates with the bridging server via HTTP / REST; the bridging server communicates with the PMAC via TCP / IP to issue control commands and provide status feedback; the bridging server provides internal maintenance diagnostics and mirrored variables for status display and safety gating; and an external clock module is installed on the PMAC controller side to receive time synchronization information from the bridging server and correct the PMAC controller's internal time base.

[0032] A method for despin control of the image field of a horizontal astronomical telescope based on Alpaca-PMAC bridging communication, based on... Figure 1 The system shown implements the following steps:

[0033] Step 1: Configure a communication endpoint compatible with the ASCOM / Alpaca protocol on the bridging server to receive connection requests, site geographic coordinate settings, UTC time settings, target pointing, synchronization, tracking, and status reading requests from ASCOM / Alpaca clients via HTTP / REST. Parse the request parameters according to the Alpaca telescope interface specification and map the parameter fields of each endpoint to variable read / write or macro instruction calls of the PMAC controller. Establish a one-to-one correspondence between endpoints, control semantics, and P variables and motor status variables in the PMAC shared memory.

[0034] The HTTP / REST communication and Alpaca endpoint resolution can adopt the AlpacaTelescope API specification published by the ASCOM organization and common Web service implementation methods. The PMAC variable reading and writing can be implemented using the shared memory access interface or C language library functions published by the controller vendor. In specific implementations, the bridging server can implement the telescope / 0 / * endpoints defined by the Alpaca standard based on the HTTP server framework, and the request parameters are parsed according to the Alpaca telescope interface documentation. Communication with the PMAC controller can be completed through the gplib library provided by the vendor or an equivalent shared memory access interface to complete variable reading and writing and macro instruction calls such as Jog / Abort. The above protocols and interfaces are all existing technologies known in the art.

[0035] The bridging server establishes a one-to-one mapping between the endpoints of each ASCOM / Alpaca telescope and the semantics of variable read / write, macro instructions, or motion instructions of the PMAC controller, and provides two operating modes: synchronous control mode and asynchronous control mode. In synchronous control mode, the bridging server immediately reads the state and constructs a response after completing a round of calculation and instruction issuance. In asynchronous control mode, the bridging server maintains the current target state and the actual state through an internal state machine, and gradually approaches the target position according to the control cycle under the conditions of meeting preset speed, acceleration, and single-step angle step size limits, and automatically ends asynchronous pointing when the termination threshold is reached.

[0036] Communication timing, time synchronization and transaction alignment, such as Figure 2 As shown, by using memory mapping to directly write the target count into the controller register and coordinating it with real-time motion command execution, additional command parsing is avoided, significantly reducing command latency and improving time alignment within the cycle.

[0037] Endpoint-control semantic mapping, such as Figure 3 As shown. The endpoints include: 1. Connection: Sets the controller connection status; 2. Station / Time: Writes the station's latitude, longitude, altitude, and UTC / local time; 3. Target / Synchronization: Sets the target's right ascension and declination and can trigger synchronization; 4. Tracking / Stop: Enables or stops tracking and de-rotation; 5. Status Read: Reads position, velocity, position angle, error, and gating status, etc. These endpoints are bridged and mapped to PMAC variable read / write or macro instruction calls.

[0038] In this way, the bridging service exposes telescope endpoints compatible with Alpaca, receiving connection, site / time, target / synchronization, tracking / stop, and status read requests; it rigorously validates parameters and maintains a request-response transaction identifier. Simultaneously, a one-to-one mapping is established between endpoints and PMAC control semantics: site / time is written to corresponding variables, target / synchronization is mapped to the desired attitude and tracking target, tracking / stop control bridges calculate and distribute status; and status reads are mapped to reading PMAC controller state variables and mirrored variables.

[0039] Step 2: Calculate the local sidereal time based on the station's latitude, longitude, altitude, and UTC time information obtained from the client by the bridging server, and determine the theoretical position angle of the image field by combining the target's right ascension and declination parameters; calculate the change in the theoretical position angle based on two adjacent moments within each control cycle, add the zero offset angle to the theoretical position angle to obtain the actual position angle, and form a target position angle sequence that changes with time according to the control cycle; continuously expand the target position angle sequence with reference to the command angle issued in the previous cycle to eliminate angle jumps near 0 / 360°, and limit the single-step angle increment, angular velocity, and angular acceleration for each cycle, while simultaneously synchronizing the calculation results with an external unified clock.

[0040] When the target position angle sequence is expanded, the command angle output in the previous control cycle is used as a reference. Among all equivalent solutions that differ by an integer multiple of 360°, the solution with the smallest difference from the command angle is selected to obtain a time-continuous target position angle sequence.

[0041] The limiting includes updating the maximum angular step size, maximum following angular velocity, and maximum acceleration in a single operation, and performing time synchronization of the target position sequence based on an external clock.

[0042] (1) An example of the calculation method for Local Sidereal Time (LST) is as follows:

[0043] In this embodiment, the number of days since epoch J2000 is first calculated, then the Greenwich Mean Sidereal Time (GMST) is obtained, and finally converted to the local Sidereal Time (LST). Specifically, it is recorded as follows: To determine the number of days from the observation time relative to J2000.0 (2000-01-01 12:00:00UTC), a commonly used astronomical approximation formula is used:

[0044] Greenwich Mean Sidereal Time (GMST) in hours is:

[0045]

[0046] Let the geographical longitude of the station be... (Unit: degrees, positive longitude), then the local sidereal time LST (unit: hours) is:

[0047]

[0048] Normalize LST to Within an hourly range.

[0049] In this embodiment, the calculation of LST can refer to the GMST approximation formula given in Meeus's "Astronomical Algorithms" or the implementation disclosed in the IAU SOFA / ERFA library. Those skilled in the art can choose any existing algorithm to implement it as needed. This invention is not limited to a specific implementation method.

[0050] (2) Examples of methods for calculating the theoretical and actual position angles of the image field are as follows:

[0051] Let the local sidereal time be LST (hours) and the target right ascension be LST. (hours), declination is (degrees), station latitude is (degrees). First, calculate the hour angle:

[0052]

[0053] Will Converted to radians, the theoretical position angle of the image field (parallax angle) It can be obtained by the following formula:

[0054]

[0055] Let the zero offset angle be... (degrees), then the unexpanded image field derotation target angle is:

[0056]

[0057] (3) An example of the continuous expansion method of the angle sequence is as follows:

[0058] To avoid abrupt changes near 0° / 360°, this embodiment uses the command angle from the previous cycle. For reference, the original target angle for this period is... To elaborate: when the difference between the two exceeds 180°, add or subtract 360° to bring the difference to within 180°. Within the range.

[0059] The following rules may be adopted:

[0060] like ,but ;

[0061] like ,but .

[0062] The unfolded result serves as the target angle for this period. .

[0063] (4) An example of a method for limiting angle / angular velocity / acceleration and synchronizing time in a single step is as follows:

[0064] 1) Single-step angle limiting

[0065] Let the target angle after unfolding be The current actual angle is The maximum angular step size in a single step is The actual number of commands issued in this cycle for:

[0066] like ,but ;

[0067] like ,but ;

[0068] otherwise .

[0069] 2) Angular velocity / acceleration limiting (corresponding to JogSpeed / JogAccel)

[0070] Let the motor angle proportionality coefficient be... (Unit: degrees / count), Rate of change of count With angular velocity The relationship is:

[0071]

[0072] When the desired maximum angular velocity is The maximum acceleration is At that time, the corresponding Jog speed and Jog acceleration of the motor are:

[0073]

[0074]

[0075] 3) Time synchronization based on an external clock (for asynchronous / tracking purposes)

[0076] Control cycle given by external clock The step size is and the maximum angular velocity is . At this time, the maximum allowable angle step size in this cycle is:

[0077]

[0078] The update amounts for both azimuth and elevation angles do not exceed .

[0079] Step 3: Based on the pre-calibrated proportional relationship between the derotating motor angle and the encoder count, the target position angle sequence obtained in Step 2 is converted into the target position count value of the derotating axis of the PMAC controller. The proportional relationship is preferably provided by the angle coefficient in the PMAC motor parameters, and the coverage coefficient written by the bridging server when not configured. The bridging server writes the target count value into the corresponding register or P variable through the mapping interface with the shared memory of PMAC, and calls the Jog position command or equivalent motion command to make the derotating motor follow the target position count in closed-loop mode, thereby realizing image field rotation compensation control.

[0080] The following is an example of the conversion between angle and encoder count, and the method for calculating error:

[0081] Let the angle proportionality coefficient of the despinning motor be... (Degrees / Counts), arbitrary encoder counts corresponding angle for:

[0082]

[0083] Conversely, when the target angle is At that time, the corresponding target count is:

[0084]

[0085] The actual count is At that time, the actual angle was The tracking error is defined as:

[0086]

[0087] Angle to count conversion and execution: Based on the motor angle-count ratio, the actual position angle is converted into a target count and sent to the PMAC derotating shaft, which is executed in closed-loop mode; the encoder count and status are read periodically to perform error monitoring and closed-loop error compensation, over-limit protection, trajectory prediction calculation and manual stop gate control; and the target count is written to the corresponding register through a memory mapping mechanism to drive the derotating motor in real time.

[0088] Step 4: Periodically read the actual position count and related status words of the derotating shaft encoder in the PMAC controller, convert them into actual position angles, and compare them with the target position angle to obtain the tracking error. Perform closed-loop error compensation on the target position angle sequence according to the preset strategy. At the same time, perform boundary detection on the actual position angle, angular velocity, and angular acceleration. If it is predicted that the trajectory may cross the boundary or violate safety constraints in the next few control cycles, prohibit the issuance of new motion commands to the PMAC controller or trigger deceleration and stop in advance. The trajectory prediction calculation is used to prohibit the issuance of motion commands to the PMAC controller while maintaining the operation of the feedforward trajectory generation and feedback verification link. When a manual stop command is received or an abnormal state is detected, the derotating control is stopped through the gating variable and the state is retained for sampling. The bridging server encapsulates the above execution results and safety gating status into an Alpaca response and returns it to the client.

[0089] Safety and anomaly handling specifically include: 1. Trajectory prediction calculation: retain calculation and verification but prohibit the transmission of motion; 2. Manual stop: immediately cancel motion and maintain state sampling for a short period; 3. Boundary protection: limit or stop angle, speed and acceleration out of bounds; 4. Transaction consistency: mirror client transaction identifiers to ensure one-to-one correspondence between request and response; 5. Disconnection and recovery: restore state and avoid duplicate transmission when reconnecting after communication interruption.

[0090] The image field despin calculation link is as follows: Sidereal time is calculated based on the station's latitude and longitude and UTC; the theoretical position angle is obtained by combining the target's right ascension and declination; this is then combined with the zero-position offset to form the actual position angle; continuous tracking is subsequently performed to avoid jitter around 0 / 360°; rate, acceleration, and single-step angle limiting are applied to the output; and a time-varying target position sequence is generated, which is then synchronized with an external clock. Specifically, as follows... Figure 4As shown. The image field despinning calculation link includes: the system obtains station latitude and longitude, altitude, time, target right ascension / declination, control cycle, zero offset, and operation switch parameters through the ASCOM / Alpaca endpoint exposed by the bridging server, and completes unit and range verification and time zone normalization; then, it calculates the local sidereal time based on the station longitude, and obtains the position angle and its rate of change by combining the target coordinates and the station latitude. In each control cycle, the system generates a feedforward target angle facing the despinning axis according to a predetermined rhythm, performs necessary frequency limiting and smoothing, and then applies single-step angle, angular velocity, and angular acceleration constraints sequentially under a unified time reference to ensure executability; then, it continuously tracks the angle issued in the previous cycle as a reference, eliminates jumps near zero degrees and 360 degrees, and updates the internal reference. If in calculation or protection state, the system only mirrors and transmits the above calculation results without issuing motion; otherwise, it converts the target angle into a target count based on the motor angle and counting ratio (motor parameters are preferred), writes it into the corresponding register of the PMAC controller through memory mapping, and calls real-time motion instructions to drive the despinning axis to execute. During operation, the system periodically collects the encoder and controller status, calculates the actual position angle and instantaneous error, implements closed-loop error compensation according to the strategy, and simultaneously performs multi-level safety gating such as boundary crossing, emergency stop, trajectory prediction calculation / manual stop. The compensation and gating results are fed back to the amplitude limiting and continuous tracking processing stage through the feedback path to correct the generation and constraints of the next cycle. The entire process maintains the transaction identifier of requests and responses, generates standardized responses with client transaction identifiers and returns them, thereby achieving interoperability with the upper computer software that supports Alpaca, thus forming a stable, low-latency, and highly deterministic image field despinning closed-loop link.

[0091] The program corresponding to the above method can be stored on a computer-readable storage medium. Figure 5 Example of interoperability with the ASCOM ecosystem (screenshot of device connection test).

[0092] The method of this invention is applicable to latitude and longitude ceremonial supports, horizontal supports, and imaging systems with independent de-rotation axes. Endpoint-semantic mapping and angle-count conversion can be parametrically extended according to different motor and encoder configurations, and can work in conjunction with ASCOM ecosystem modules such as guides and camera triggers.

[0093] In summary, this invention provides a method for image field despin control of a horizontal astronomical telescope based on Alpaca–PMAC bridging communication. This method sets up a communication endpoint compatible with the ASCOM / Alpaca protocol on the bridging server to receive commands from clients regarding connection, site geographic coordinates, UTC time settings, target pointing, synchronization, tracking, and status reading, mapping these commands into motion control semantics recognizable by the PMAC controller. The system calculates local sidereal time based on the site's geographic coordinates and time information, combines this with the target's right ascension and declination parameters to obtain the theoretical position angle and its rate of change, and obtains the actual position angle through zero-position offset compensation, generating a target position sequence that varies over time. This sequence is continuously expanded and processed through velocity, step size, acceleration limiting, and time synchronization, then converted into motor position count values ​​for the PMAC controller. These counts are written to the corresponding registers via a memory mapping mechanism as target position commands to drive the despin motor in real time, achieving image field rotation compensation control. The controller collects feedback data from the position encoder to implement closed-loop error compensation and sets up multi-level safety gating to prevent over-limit and abnormal events. This method achieves the organic integration of feedforward trajectory generation and feedback correction, enabling high-precision, high-reliability, and high-real-time image field despin control for altazimuth telescopes within the ASCOM ecosystem without requiring modifications to existing client and controller main programs.

[0094] The above embodiments are merely typical implementations of the present invention and are not intended to limit the present invention. All equivalent substitutions or improvements made within the scope of the claims of the present invention are within the protection scope of the present invention.

Claims

1. A method for image field de-rotation control of an alt-azimuth telescope based on Alpaca-PMAC bridge communication, characterized in that, Comprising the following steps: Step 1: Set up a communication endpoint compatible with ASCOM / Alpaca protocol on Alpaca-PMAC bridge server for receiving instructions from ASCOM / Alpaca client, including but not limited to connection, site geographic coordinate setting, UTC time setting, target pointing, synchronization, tracking and status reading instructions, and map the instructions of each ASCOM / Alpaca telescope endpoint to motion control semantics recognizable by PMAC controller, establish the correspondence between endpoint-control semantics and PMAC memory mapping variables; Step 2: Calculate local sidereal time according to the site geographic coordinate information and UTC time information obtained by Alpaca-PMAC bridge server from ASCOM / Alpaca client, and calculate the theoretical position angle of the image field combined with the right ascension and declination parameters of the target, calculate the change of the theoretical position angle at each control period according to the theoretical position angle at the adjacent two times, add the zero position offset angle to the theoretical position angle to obtain the actual position angle, and form the target position angle sequence changing with time according to the control period; continuously expand the target position angle sequence with reference to the command angle issued in the last period to avoid 0 / 360° jump, and apply amplitude limiting to the single-step angle increment, angular velocity and angular acceleration of each period, and simultaneously perform time synchronization processing on the calculation results according to the external unified clock; Step 3: Convert the target position angle sequence obtained in step 2 to the target position count value of the PMAC controller de-rotation shaft according to the proportional relationship between the de-rotation actuator angle and the encoder count obtained by pre-calibration, and write the target position count value into the corresponding register or P variable through the mapping interface of the shared memory with PMAC by Alpaca-PMAC bridge server, and call the Jog position instruction or equivalent motion instruction to make the de-rotation actuator follow the target position count in closed loop mode, realizing image field rotation compensation control.

2. The method of claim 1, wherein: Also comprising: Step 4: Periodically read the actual position count and related status word of the de-rotation shaft encoder in the PMAC controller, convert it to the actual position angle and compare it with the target position angle to obtain the tracking error, and compensate the target position angle sequence according to the preset strategy; simultaneously, perform out-of-bound detection on the actual position angle, angular velocity and angular acceleration, and when the trajectory in the future several control periods is likely to exceed the boundary or violate the safety constraints, prohibit the issuance of new motion instructions to PMAC controller in advance or trigger deceleration and stop; when receiving a manual stop instruction or detecting an abnormal state, stop the de-rotation control through the gating variable and keep the state back sampling; Alpaca-PMAC bridge server encapsulates the above execution results and safety gating state into Alpaca response and returns it to ASCOM / Alpaca client.

3. The method of claim 1, wherein: In step 1, the Alpaca-PMAC bridge server maps the parameter fields of each ASCOM / Alpaca telescope endpoint to variable read-write, macro instructions or motion instructions of the PMAC controller, establishing a one-to-one correspondence between the endpoint, control semantics and P-variables in the PMAC shared memory and motor state variables.

4. The method of claim 1, wherein: In step 1, the Alpaca-PMAC bridge server provides both synchronous and asynchronous control modes; in asynchronous control mode, the Alpaca-PMAC bridge server maintains the current target state and actual state through an internal state machine, gradually approaches the target position according to the control period under the condition of meeting the preset speed, acceleration and single-step angle step limit, and automatically ends the asynchronous pointing when the termination threshold is reached.

5. The method of claim 1, wherein: In step 2, the theoretical position angle is obtained by calculating the site geographic latitude, local sidereal time, and target right ascension and declination, and the actual position angle is the result of adding the angle offset to the theoretical position angle; the target position angle sequence is referenced to the command angle output in the previous control period when it is unfolded, and among all equivalent solutions with a difference of integer multiples of 360°, the solution with the smallest difference from the command angle is selected to obtain a continuous target position angle sequence in time.

6. The method of claim 1, wherein: The amplitude limiting in step 2 includes the maximum angle step, maximum following angular velocity and maximum acceleration for a single update, and time synchronization of the target position angle sequence based on an external clock.

7. The method of claim 1, wherein: In step 3, the proportional relationship preferably uses the angle coefficient in the PMAC motor parameters, and when not configured, the override coefficient written by the Alpaca-PMAC bridge server is provided.

8. The method of claim 2, wherein: The out-of-boundary detection in step 4 prohibits issuing motion instructions to the PMAC controller while maintaining the operation of the feedforward trajectory generation and feedback correction link.

9. An image field de-rotation control system for an alt-azimuth astronomical telescope, characterized by, An ASCOM / Alpaca client, an Alpaca-PMAC bridge server, a PMAC controller, a non-rotating actuator and an encoder; the Alpaca-PMAC bridge server is used to execute the method of any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, A program is stored thereon, which, when executed by a processor, implements the method of any one of claims 1 to 8.