Solar panel installation calibration method and system, storage medium and program product

By calculating the sun's position and displaying the target's shadow on the panel plane using augmented reality, combined with the bracket angle scale and unidirectional approximation adjustment guidance, the problem of large installation errors of solar panels under non-noon conditions was solved. This enabled low-cost, easy-to-operate year-round or seasonal optimized attitude calibration, improving installation accuracy and power generation efficiency.

CN121807009APending Publication Date: 2026-04-07PUWELL TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies make it difficult to quickly and accurately adjust solar panels to the target posture optimized for the whole year or season under non-midday conditions. Especially in the absence of professional instruments and automatic tracking devices, users find it difficult to convert solar position data into a visible target on the panel plane, resulting in large installation errors and low accuracy.

Method used

By obtaining the location and time to calculate the sun's position, the target's installation posture is determined. The target's shadow, anchored by augmented reality, is used as the sole reference on the panel plane. Combined with the bracket angle scale and unidirectional approximation adjustment guide, users can quickly calibrate without professional instruments.

Benefits of technology

It enables low-cost, easy-to-operate one-time calibration of solar panels under non-midday conditions, reducing installation errors, improving installation accuracy and long-term power generation efficiency, and reducing reliance on professional measuring tools and sensor arrays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807009A_ABST
    Figure CN121807009A_ABST
Patent Text Reader

Abstract

The invention relates to a solar panel automatic calibration method, in particular to a solar panel installation calibration method and system, a storage medium and a program product. The system obtains the position and time under the authorization of a user, obtains the height and orientation of the sun based on a sun position algorithm, and determines the pitching and orientation of a target according to a year-round / season strategy. An alignment rod and a plane reference mark are arranged on a panel, and the direction / length of a target shadow is calculated and is displayed by a mobile terminal in an AR anchoring mode. A user firstly sets pitching according to scales and then finely adjusts the orientation according to one-way approximation; and the camera detects the shadow of the alignment rod in real time, calculates a vector error with the target shadow and gives a fine adjustment instruction until the tolerance is met. And the perpendicularity of the optional alignment rod is calibrated and compensated. According to the scheme, an automatic tracking mechanism is not needed, fixed attitude calibration can be completed at one time in the non-noon, the return stroke error is restrained, the long-term power generation efficiency is improved, and the device can serve as a universal accessory to be matched with a stock panel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic calibration method for solar panels, and more particularly to a solar panel installation calibration method, system, storage medium, and program product. Background Technology

[0002] With the increasing prevalence of distributed photovoltaics, portable outdoor power supplies, and off-grid applications, the demand for calibrating the installation orientation and tilt angle of solar panels (hereinafter referred to as "solar panels") in various environments has grown significantly. Whether it's a rooftop or ground-mounted fixed bracket, or a foldable / portable module, the angle of incidence of the panel relative to the sun directly affects the incident irradiance and the module's output power; if the installation angle deviates from the optimal range, both annual power generation and instantaneous power output will be significantly affected. Therefore, how to quickly adjust the panel to the "target installation posture" (such as year-round or seasonal optimization posture) under non-ideal installation conditions (non-noon, lack of precision instruments, non-professional users) has become a recurring challenge in practice.

[0003] The earliest and most intuitive manual alignment method stemmed from the geometric relationship of centered shadow and panel normal aligned with the sun: a projectable alignment component (a small post, dot, or cross) was placed on the panel, along with a target area marked with a center mark; when the direction of sunlight was collinear with the line connecting the center of the target area and the alignment component, the shadow cast by the alignment component on the target area fell in the center, indicating that the panel normal was aligned with the sun's direction at that moment, i.e., the instantaneous alignment state at that instant. US Patent 10,511,254B1 systematically described this approach: its device included a "first alignment feature" (projectable shadow) located above the target area and a second alignment feature for indicating the center position; when sunlight aligns with the alignment feature along the center, the shadow falls precisely in the center, guiding the user to adjust the panel to the optimal sun-facing direction; the patent also proposed detailed designs surrounding the projection cavity, transparent cover, post / handle arrangement, and improved readability. The advantages of this approach are its intuitiveness, low cost, and lack of electronic control. However, its goal is to maximize incident radiation instantaneously rather than to perform a one-time calibration to optimize the attitude throughout the year or season. Furthermore, in situations other than midday or when users can only make low-frequency adjustments, this method cannot directly tell users which fixed angle is better for mounting the panel.

[0004] Another traditional approach is to use a photosensitive array / pillar projection detection + actuator to achieve automatic tracking, allowing the panel to continuously face the sun during the day, thereby obtaining higher total solar irradiance and output. Chinese patent CN104020780 discloses a scheme of setting "projection pillars and multiple sets of photosensitive sensors" on the panel: the pillar shadows fall on different sensors, producing light intensity differences. The central control device judges the deviation and drives the mechanism to rotate the panel until the pillar shadows leave the sensing area or the error disappears, achieving self-adjustment of the angle according to the sun, without relying on preset timing or latitude and longitude information. CN111578540A further introduces piezoelectric drive and solar azimuth measuring disk, using a top-mounted piezoelectric linear mechanism to adjust the panel attitude with high precision, achieving automatic sun alignment control. The advantage of this type of solution is continuous optimal sun alignment, while the disadvantages are high hardware complexity, cost, power consumption, and maintenance. For civilian portable or rooftop fixed installation users, it is often undesirable to install an electronic control actuator system, and they also lack the energy and maintenance conditions for continuous tracking.

[0005] The development of mobile internet and smartphone sensors has made "solar position calculation and visualization" a lightweight and low-cost auxiliary tool. The Solar Position Algorithm (SPA) proposed by the National Renewable Energy Laboratory (NREL) has become one of the engineering standards for calculating the solar zenith angle / altitude angle and azimuth angle, covering a range from 2000 BC to 6000 AD, with an uncertainty of ±0.0003°. The engineering implementation and report of SPA provide a detailed explanation of the variables, corrections, and key points of solar position calculation, and it has been widely adopted in academia and industry.

[0006] At the application level, mobile applications such as Sun Seeker offer "solar path visualization and shadow / solar illumination analysis," and support AR (augmented reality) overlay displays of the sun's trajectory in the sky, the path of the vernal equinox / summer solstice, sunrise and sunset times, etc., allowing users to intuitively view the sun's position at present and in the future through their phone's camera view. The official pages on Google Play and the App Store, as well as the developer website, clearly describe its 3D AR view, planar compass view, and solar illumination time display functions. While these applications lower the barrier for users to understand and obtain solar altitude and azimuth angles, they typically do not establish a unique physical target shadow association with the specific plane geometry of the panel, nor do they directly solve the operational loop problem of mounting the panel in a fixed position on the target—users still need to translate abstract angle information into specific support adjustment actions and in-plane geometric references of the panel.

[0007] For applications lacking automatic tracking capabilities and where users prefer not to make frequent adjustments, the industry has long adopted the rule of thumb of "fixed tilt angle approximating optimality": in most mid-latitude regions, a panel tilt angle equal to the local latitude is considered to approximate the optimal total annual power generation; sometimes, a correction of ±15° can be made seasonally (increased in winter, decreased in summer) to achieve higher power generation in the target season. Publicly available information offers various descriptions and optimization discussions of this approximation. For example, independent websites and popular science / commercial platforms mention the "latitude rule" and "±15° seasonal correction," while also pointing out that under specific objectives (such as prioritizing winter power generation or snow removal), a steeper tilt angle may be more suitable. These facts reflect the multi-objective trade-offs in fixed attitude optimization: total annual power generation, specific seasons, snow removal and maintenance convenience, and shading statistics all influence the optimal choice.

[0008] However, there are still operational gaps in translating empirical perspectives into specific calibration actions: 1. Users typically complete installations outside of midday, or even under conditions of unstable lighting or limited visibility; in these situations, the method of centering the shadow against the sun no longer corresponds to the target with the required fixed posture; 2. Using a mobile phone to measure angles or read numbers is easily affected by grip posture, mobile phone sensor drift, local magnetic interference, etc., resulting in an unstable mapping between angle readings and the panel plane; 3. Even if the pitch is coarsely adjusted using the bracket scale, the azimuth angle still requires fine adjustment; however, mechanical backlash and hinge / lead screw clearance can cause the final state to deviate due to back-and-forth fine adjustments; 4. The lack of a consistent reference within the panel plane makes it difficult for users to convert the sun's position data into a visible target on the panel, thus lacking a unique convergence criterion.

[0009] In summary, existing manual sun-shadow centering and automatic tracking solutions each have their own strengths: the former is simple but aims for instantaneous sun alignment; the latter offers high performance but is costly and complex. Mobile SPA / AR applications provide excellent visualization of astronomical information, but a human-machine collaborative closed-loop system is still lacking that connects the fixed orientation of the target with the visualized target shadow on the panel plane and can complete calibration in one go under non-noon conditions. Therefore, the industry still lacks a human-machine collaborative calibration path that uses the target installation orientation as a guideline and transforms the calculated sun position into the target shadow on the panel plane, enabling users to complete "one-step fixed orientation" installation even under non-noon conditions using a unique and matchable physical reference. For portable PV, rooftop residential PV, and light commercial applications, this path holds promise for achieving a new balance between cost, ease of use, and installation accuracy. Summary of the Invention

[0010] To address the aforementioned technical problems, the purpose of this invention is to provide a low-cost, easy-to-operate solar panel installation and calibration method and system, enabling users to adjust the panel to the target posture optimized for the whole year or season at any time, even outside of midday. By obtaining the location and time to calculate the sun's position, determine the target's pitch and azimuth, and using the target's shadow anchored by augmented reality as the sole reference on the panel plane, combined with the bracket angle scale and unidirectional approximation adjustment guidance, users can quickly and accurately complete the installation without professional instruments or automatic tracking devices. This reduces installation errors and backhaul effects, improves long-term power generation efficiency, and can be used as a universal accessory to adapt to existing panels.

[0011] To achieve the above objectives, the present invention adopts the following technical solution:

[0012] A solar panel installation calibration method, applicable to solar panels equipped with alignment rods perpendicular to the surface of the solar panel, is performed according to the following steps:

[0013] S1: The mobile terminal obtains the user-authorized geographic location and date / time information;

[0014] S2: Calculate the solar position parameters based on the given location and time to obtain the solar altitude angle and azimuth angle;

[0015] S3: Determine the target installation posture of the solar panel according to the preset installation strategy. The target installation posture includes the target pitch angle and the target azimuth angle. The preset installation strategy includes at least "year-round optimized posture" and / or "seasonal optimized posture".

[0016] S4: In the solar panel plane coordinate system, based on the target installation posture and the sun position parameters, calculate the target shadow trajectory parameters on the panel plane when the alignment rod is aligned with the panel normal. The parameters include at least one or both of the target shadow direction vector and the target shadow length.

[0017] S5: Under the constraint of the planar reference mark arranged on the surface of the solar panel, the pose estimation and homography transformation of the panel plane are performed by the mobile terminal camera, and the target shadow trajectory parameters are anchored and displayed on the actual panel plane area in the form of graphics or augmented reality overlay.

[0018] S6: The user first adjusts the panel pitch angle to the target pitch angle according to the pitch angle scale on the solar panel bracket, and then adjusts the orientation around the vertical axis;

[0019] S7: The mobile terminal detects the alignment rod and its actual shadow vector on the panel plane through image processing, and calculates the vector error between the alignment rod and the target shadow trajectory parameters;

[0020] S8: Generate a unidirectional approximation adjustment command based on the vector error to suppress the influence of the support mechanism's return stroke on the final attitude, until the vector error meets the preset tolerance and convergence criterion, at which point the calibration is determined to be complete.

[0021] Preferably, the method also includes step S0 for calibrating and compensating for the verticality of the alignment rod: based on the visual angle measurement of the annular bubble level and / or the mobile terminal camera set at the base of the rod, the angular deviation between the alignment rod axis and the solar panel normal is determined, and the deviation is introduced into the calculation of the target shadow trajectory parameters for geometric compensation to generate the compensated target shadow direction and / or length.

[0022] As a preferred option, in step S1: latitude and longitude are automatically read via GNSS, and IANA time zone and daylight saving time (DST) offset are resolved; a lightweight NTP time synchronization is performed once under network conditions to suppress system clock drift, and the user is prompted to check the time in offline scenarios; manual input rollback of city / coordinates and date and time is supported; the above location and time are only used locally for angle calculation, and the cache is automatically cleared when the session ends.

[0023] In step S2: the solar position algorithm SPA or equivalent is used to calculate the solar declination and mean time difference, and the local true solar time and hour angle are obtained accordingly; the solar altitude angle is calculated according to... The obtained azimuth angle is determined by quadrant determination using atan2 and then unified to a clockwise interval with true north as 0°; atmospheric refraction correction is applied to the elevation angle when meteorological / altitude information is available.

[0024] Preferably, in step S3: the target pitch angle βT and target azimuth angle γT are obtained according to a preset installation strategy, wherein the strategy includes at least "year-round attitude optimization" and / or "seasonal attitude optimization": when data is insufficient, an empirical method is used; when irradiation and temperature data are available, an irradiation transpose and temperature correction are used to construct a periodic energy objective function and search for the maximum solution (βT, γT) within the constraints.

[0025] Preferably, in step S4: based on (βT, γT) and the solar position parameters, the projection of the solar direction onto the panel plane is obtained, and the direction unit vector and / or length of the target shadow is obtained, wherein the length is calculated according to the incident angle, and when there is a verticality deviation of the alignment rod, a compensation model containing the actual axial amount of the rod is used to generate the target shadow parameters.

[0026] As a preferred option, in step S6: first, adjust the pitch angle to βT according to the pitch scale of the support, and then approach the azimuth angle in small steps around the vertical axis in a fixed direction so that the direction of the alignment rod shadow is consistent with the target shadow; if necessary, use the lead screw fine adjustment mechanism to make fine adjustment of the pitch, and cross-check the pitch scale through the IMU reading of the mobile terminal.

[0027] As a preferred embodiment, in step S5: planar reference markers are arranged on the panel surface; after the mobile terminal performs distortion correction on the camera image, it uses the marker corner points to solve the homography matrix to complete the panel planar pose estimation, and the target shadow trajectory is superimposed onto the actual panel area in a graphical or augmented reality manner; when the reprojection error or corner point visibility is below the threshold, the superimposition is paused and a prompt to re-frame the view is given.

[0028] As a preferred embodiment, in step S7: the camera image is shaped to the panel plane metric domain by inverse homography transformation, and the direction and length of the alignment rod shadow principal axis are extracted based on the redundancy detection of the edge-line method and the region-skeleton method to form the actual shadow vector in the panel plane. The directional angle error, length residual and weighted comprehensive error between the shadow and the target shadow trajectory parameters are calculated for subsequent adjustment and convergence determination.

[0029] As a preferred option, in step S8: the step size of azimuth and pitch adopts a proportional, saturation, and guardrail anti-crossing strategy, and the rotation / pitch direction is fixed to avoid backtracking; the convergence criterion is that the comprehensive error does not increase monotonically within the preset dwell time window and the final value is lower than the direction and length tolerance thresholds respectively; when there is insufficient light, backlight, or the anchoring quality is not up to standard, the degradation mode is entered or the pause command is given until the conditions are met.

[0030] Furthermore, the present invention also provides a solar panel alignment system for implementing the method, comprising:

[0031] (1) A solar panel bracket with a pitch-adjustable structure and pitch angle scale;

[0032] (2) An alignment rod set at right angle to the surface of the solar panel, wherein the alignment rod is a foldable or pluggable structure, and the insertion hole axis of the pluggable structure is in the same direction as the normal of the panel and is provided with a limiting cone surface or key structure to ensure perpendicularity.

[0033] (3) Planar reference marks arranged on the surface of the solar panel are used for pose estimation and homography transformation of the mobile terminal;

[0034] (4) An application installed on a mobile terminal is configured to perform the steps described in S1–S8 and to display the target shadow trajectory parameters in an augmented reality manner on the actual panel plane.

[0035] (5) The system can also calibrate the installation posture of the target by matching the target shadow trajectory at any time other than noon.

[0036] Furthermore, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the method.

[0037] Furthermore, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the method.

[0038] This invention, employing the aforementioned technical solution, couples the target installation attitude (elevation and azimuth optimized year-round / seasonally) with the current solar position to calculate a uniquely determined target shadow vector within the panel plane. This vector is then displayed using a plane reference marker and homography transformation for AR anchoring, providing a visual reference consistent with the panel geometry. This allows users to calibrate the panel to the target attitude even outside of midday. Furthermore, it introduces alignment rod verticality compensation and a closed-loop guidance system for vector error—one-way approximation—to suppress systematic deviations caused by support backlash and reading parallax, improving calibration convergence and repeatability. Compared to instantaneous alignment that only achieves "shadow centering = sun alignment" and high-cost automatic tracking systems, this invention achieves near-long-term optimal fixed attitude settings with low hardware complexity, reducing seasonal adjustment frequency and installation time, decreasing reliance on specialized measuring tools / sensor arrays, and adapting to existing panels through universal accessories. This comprehensively improves installation accuracy, robustness, and year-round power generation revenue. Attached Figure Description

[0039] Figure 1 This is a system framework diagram of the present invention.

[0040] Figure 2 This is a flowchart of the method of the present invention.

[0041] Figure 3 This is a flowchart of the SO steps.

[0042] Figure 4 This is the flowchart for step S1.

[0043] Figure 5 This is the flowchart for step S2.

[0044] Figure 6 This is the flowchart for step S3.

[0045] Figure 7 This is the flowchart for step S4.

[0046] Figure 8 This is the flowchart for step S5.

[0047] Figure 9 This is the flowchart for step S6.

[0048] Figure 10 This is the flowchart for step S7.

[0049] Figure 11 This is the flowchart for step S8. Detailed Implementation

[0050] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0051] I. Overall Structure

[0052] like Figure 1 , Figure 2 As shown, this invention addresses the installation and calibration of fixed or low-frequency regulated solar panels, proposing a human-machine collaborative method and system based on target attitude, target shadow, AR anchoring, and closed-loop guidance. The target attitude refers to the combination of the solar panel's pitch and azimuth angles obtained through simplified empirical or energy optimization solutions throughout the year or a specific season / cycle (e.g., the pitch angle is approximately equal to the latitude of the location, or a ±15° correction based on winter and summer, or the optimal annual power generation is determined through a numerical model of historical / predicted irradiance and shading statistics). The system acquires position and time at any given moment, calculates the solar altitude and azimuth angles, and projects the solar vector and target attitude onto the panel plane at that moment to obtain a "uniquely determined target shadow trajectory" (including direction and length) within the panel plane. Then, using the preset planar reference markers on the panel, the system uses camera pose estimation and homography transformation to stably anchor the target shadow in the real panel area. The user only needs to adjust the bracket to make the "shadow of the actual alignment rod" coincide with the "target shadow trajectory" or fall within the preset tolerance, so that the panel can be calibrated to the target attitude in one go, without waiting for noon or relying on expensive automatic tracking hardware.

[0053] To improve the determinism and repeatability of the final attitude, the system introduces alignment rod perpendicularity compensation, vector error measurement, and a "one-way approximation" adjustment strategy to suppress system deviations caused by mechanical backlash, shooting parallax, and ambient light fluctuations, making the installation convergence process have clear criteria and verifiability. The core of this overall structure is that it no longer uses the instantaneous extreme value of "shade centering = panel normal to the sun" as the sole objective, but externalizes the "target fixed attitude" into a visual geometric object in the panel plane through geometric mapping and AR anchoring, allowing non-professional users to complete the one-time installation calibration in an intuitive and low-cost manner.

[0054] II. Component Composition

[0055] To support the successful implementation of the above overall structure, the hardware and software configuration of this invention is recommended as follows.

[0056] Solar panels and their adjustable brackets: It is preferable to have clear angle markings engraved on the pitch and rotation hinge side of the bracket, and to configure a composite mechanism with stopping and fine-tuning capabilities. For example, a discrete gear positioning with a pawl is used for large strokes, and a lead screw and nut seat are used for continuous fine-tuning for small strokes. The angle reading resolution is preferably 1°, and the reading error is controlled within ±0.5°.

[0057] Alignment rod: A socket (plug-in type) or a positioning hinge with mechanical stop (folding type) is set on the panel surface or frame to be aligned with the panel normal. The rod length should be 50-80mm and the diameter should be 3-6mm. The end face is chamfered to obtain a clear shadow edge. The socket is designed with a conical surface and key limit to ensure that the angle with the panel normal is ≤0.3°. A small bubble level can be set at the base of the rod for verticality calibration.

[0058] Planar reference markings: At least three high-contrast, UV-resistant marking patches (such as checkerboard or Aruco type markings) are affixed to the non-power-generating area of ​​the panel, preferably in the four corners of the panel, to expand the effective field of view and improve the stability of pose estimation; the marking surface is coated with a matte film to reduce specular reflection.

[0059] Mobile terminal: Utilizing common smartphones or tablets equipped with cameras, IMUs, and basic computing capabilities; the software side includes modules for positioning and clock management, solar position algorithms (which can call standard algorithm libraries or be implemented internally), camera calibration and distortion correction, planar pose estimation and homography transformation, target shadow generation and rendering, shadow detection and error calculation, and human-machine guidance and convergence determination for unidirectional approximation.

[0060] Environment and optical conditions: To obtain stable shadow edges and low image noise, it is recommended to perform calibration under panel illuminance ≥20klx. If the illuminance is insufficient, the shadow contrast is inadequate, or there is significant obstruction, the software should prompt the user to pause or adjust the shooting angle before measuring again to avoid misjudgment.

[0061] III. Implementation Steps and Detailed Description

[0062] S1. Obtain location and time

[0063] After obtaining user authorization, the mobile terminal prioritizes reading latitude and longitude via GNSS and resolving the local time zone and time. When network availability is available, it performs a lightweight NTP time synchronization to suppress system clock drift. When offline or with restricted authorization, it provides manual input rollback. For regions observing Daylight Saving Time (DST), it automatically resolves and eliminates ambiguity. On the privacy side, location and time are used only locally for angle calculations and attitude determination; the cache is cleared upon session termination and no data is uploaded to the server. To ensure consistency across the calculation process, this step unifies all times to UTC and derives the Julian Day (JD) and the Julian century number T from J2000 onwards.

[0064] like Figure 4 As described above, during implementation, the terminal first obtains the user's location permission on the foreground and retrieves GNSS positioning data once to obtain latitude and longitude, which are denoted as... The coordinates are set to λ (positive for east longitude and north latitude). If high-precision positioning cannot be obtained, the user can manually input the city / coordinates and date / time, and the latitude and longitude resolution results will be displayed on the interface for confirmation. The device's local time t is then read. local The standard time offset is obtained by combining the IANA time zone identifier returned by the system with the current DST status. tz offset from daylight saving time DST Therefore, local time is unified to UTC:

[0065] t UTC =t local -offset tz -offset DST ;

[0066] Among them, t UTC To coordinate with UTC (hours or ISO-8601 timestamps); t local The local time displayed on the device; offset tz This is the standard time difference (in hours, not necessarily the hour) of this time zone relative to UTC; offset DST Add an offset (in hours, 0 if not active) to daylight saving time. During the repeated / missing periods of the daylight saving time switching day, the terminal should eliminate ambiguity by checking the system's "fold" or by reverse calculation via UTC; if it cannot be determined, prompt the user to select and mark "uncertain" in the output.

[0067] To support the subsequent calculation of the sun's position (S2), UTC time is converted to Julian day (JD) and Julian century number T. Let the Gregorian calendar date be Y (year), M (month), and D (day), and the UTC time be h:m:s, then the following formula is used:

[0068]

[0069] Wherein, JDN is the integer part of the Julian Day; JD is the Julian Day with a decimal; and T is the number of Julian centuries (century) starting from epoch J2000.0 (JD=2451545.0).

[0070] Regarding quality and rollback: If the network is available, perform a lightweight NTP time synchronization to obtain the system clock skew δ. clk The timestamp is corrected within the current session; when offline, the user is prompted to check the device time. The positioning result includes horizontal accuracy σ. h With respect to provider type (GNSS / Wi-Fi / cellular), when σ hIf the distance exceeds a threshold (e.g., 500m) or the user selects "approximate location only," the interface prompts for confirmation or manual correction; altitude can be optionally read (for finer atmospheric refraction correction). All inputs are normalized to form a standardized output. Regarding privacy and data security, the above data is only used locally for calculating the sun's position and target attitude, and is not uploaded by default; the cache is cleared at the end of the session, and users are allowed to manually delete it at any time. Through this process, S1 provides accurate, traceable, and privacy-compliant basic data for S2's calculation of the sun's altitude and azimuth angles.

[0071] S2. Calculate solar position parameters

[0072] like Figure 5 The mobile terminal calculates the solar declination and local time angle based on the location and time data of S1 using a solar position algorithm (SPA / equivalent implementation recommended), thereby obtaining the altitude and azimuth angles in the horizon coordinates. Internal triangulation calculations uniformly use radians, while external display and log availability are also supported; latitude... North latitude is taken as positive, and longitude λ is taken as positive east longitude; azimuth is taken as true north as 0° and clockwise as positive. When meteorological / altitude information is available, the elevation angle is corrected for refraction; the corresponding status position is output when there is polar day / polar night or the sun is below the horizon.

[0073] 1) Unified input

[0074] Read from S1: Latitude Longitude λ, local time t local (Including DST processing), IANA time zone (tz), Julian Day (JD) or Julian Century (T). All internal values ​​are converted to radians and used in trigonometric functions.

[0075] 2) Calculate declination and hour angle (two options available, library / high precision is preferred by default)

[0076] (a) Recommendation: SPA / equivalent library can be used to directly obtain solar declination δ and mean time difference EoT;

[0077] (b) Simplified approximation (for offline verification): The daily declination can be obtained using the Cooper approximation.

[0078]

[0079] Where n is the day number of the year (1–365 / 366, degrees are used for display and internal radian calculation).

[0080] Calculation of true solar time (TST) and hour angle (H) based on mean time difference and longitude correction:

[0081] TST=(60t local +EoT+4(λ-LSTM))mod1440,

[0082] Where TST stands for true solar time (minutes); t local The local clock time (hours, including DST) is used; EoT is the mean time difference (minutes, given by a library or formula); LSTM = 15° × tz is the standard longitude (degrees) of this time zone; H is the local time angle (degrees, positive for West Afternoon and negative for East Morning), which is calculated in degrees first and then converted to radians in practice.

[0083] 3) Elevation angle and azimuth angle (horizontal coordinates)

[0084] Geometric elevation angle (unreflected)

[0085]

[0086] Where α geo Geometric elevation angle (radians / degrees); δ is latitude (radians / degree); H is solar declination (radians / degree); H is hour angle (radians / degree).

[0087] Azimuth (with true north as 0°, clockwise) is set to atan2 to ensure correct quadrant alignment:

[0088]

[0089] Where A * A is the midpoint angle in radians; A is the final azimuth angle (degrees, normalized to [0°, 360°)).

[0090] 4) Atmospheric refraction correction (optional, recommended to enable)

[0091] When the view elevation angle needs to be output, correct it according to Saemundsson's empirical formula:

[0092]

[0093] Where R arcmin α is the refractive index (arcminute); geo,deg T represents the geometric elevation angle in degrees; P is the air pressure (hPa, which can be approximately converted from altitude); T amb α represents the ambient temperature (°C); α represents the apparent height angle (radians). When α geo When the angle is less than -1°, this approximation is unreliable, and it can be directly marked as "the sun is below the horizon".

[0094] 5) Boundary and Quality Control

[0095] When the sun is not above the horizon at high latitudes during polar day / night or when the sun does not rise above the horizon for an entire day, sinα geo This might correspond to an invisible sun; output α<0 and set the "invisible" status bit; when |cos H|≈0 or In extreme cases, if the azimuth angle value is unstable, the last available value is retained or NaN is output and the status bit is set; all angles are unified to degrees in the output layer and the internal radian value is recorded for debugging.

[0096] 6) Output Specifications

[0097] This forms a structure that can be directly used by subsequent modules: {α,A,α geo ,δ,H,flags}, where flags include whether refraction correction is needed, whether the sun is visible, and whether it is the boundary between polar day and polar night. The production mode is based on δ, EoT and the final α,A from the SPA / equivalent high-precision library; the above approximation is used as an offline fallback and rapid verification, and should normally be consistent with the library results within ±0.05°.

[0098] S3. Determine the target installation posture.

[0099] This invention designs the "target installation attitude solution" as a functional subsystem that can run locally on the terminal. Its inputs come from the position and time information obtained in previous steps, as well as optional data resources (hourly irradiance, ambient temperature, scene occlusion, and surface albedo, etc.). The subsystem's outputs are the target pitch and azimuth angles under either "year-round optimized attitude" or "seasonal optimized attitude," denoted as β. T With γ T To balance varying data availability and computational resources, the system provides two parallel solution chains: one is a fast empirical chain that can operate entirely offline, using simple and robust engineering rules to provide β. T ,γ T Second, there is the data-driven energy optimization link. When hourly or higher-granularity irradiance and temperature data are available, an objective function is constructed through irradiance transpose and temperature correction, and the optimal (β) is searched using a grid. T ,γ T The two links share the same set of input validation, structural constraints, and result robustness strategies, namely, first limiting the pitch angle range β. min ≤β≤β max And fix or limit the azimuth angle according to construction or roof conditions (such as the roof normal γ). roof (and its permissible deviation), then uniformly round and smooth the results, and finally put β T ,γ T It is then passed to the subsequent target shadow calculation module to complete the geometric rendering and calibration closed loop.

[0100] In terms of component composition, the S3 subsystem consists of five functional blocks: data access and verification, strategy selection and constraint management, empirical solution, energy optimization, and result robustness and output. Data access and verification reads dimensions from the preceding modules. Longitude, time, and solar altitude angle α(t) and azimuth angle A(t); if network access is available, simultaneously read hourly total irradiance GHI(t), direct irradiance DNI(t), diffuse irradiance DHI(t), and ambient temperature T. amb (t), surface albedo ρ g The occlusion factor S(t) is used, and timestamp alignment, missing measurement identification, and outlier handling are completed. Strategy selection and constraint management determine whether to adopt a "year-round optimization posture" or a "seasonal optimization posture" based on the user's selection in the application interface, while applying construction and structural constraints. Empirical solutions and energy optimization provide solutions under conditions of scarce and abundant data, respectively. Robustnessing and output limit, round, and mark the source of the solution, and record the estimated revenue and metadata.

[0101] like Figure 6 As stated above, in terms of implementation steps, the first step is to prepare the strategies and constraints: when the user selects "optimize posture throughout the year", the time window... For the whole year; when "Seasonally Optimized Posture" is selected, It can be a specific season or a specific month; the system will output β separately for each time window. T ,γ T Data availability is then assessed: if GHI / DNI / DHI and temperature sequences are missing or unavailable, the empirical approach is used; if data is complete and the user allows for longer calculations, the energy optimization approach is used. Regardless of the approach used, the azimuth is preferentially taken as due south in the Northern Hemisphere and due north in the Southern Hemisphere; if the roof or array orientation is restricted, γ is fixed. T =γ roof Or only make minor adjustments in its neighborhood.

[0102] In the rapid experience chain, the attitude optimization throughout the year can directly adopt the "dimensional law," that is... Where, β T The target pitch angle (in degrees or radians); This refers to the latitude (degrees or radians) of the installation location. When users emphasize energy supply security during the low solar altitude period in winter, an offset can be added to the annual value; when emphasizing capacity during the summer air conditioning load period, the offset can be reduced.

[0103]

[0104] in, and These represent the target pitch angle (in degrees) for winter or summer scenarios, respectively; the numerical range "10°~15°" indicates that it can be selected between 10 and 15 degrees according to scenario and user preference. When using "seasonally optimized attitude," to ensure that the pitch angle changes physically with the seasons, it can be calculated first based on the Cooper approximation of the solar declination in the middle of the moon:

[0105]

[0106] Where δ(n) is the solar declination (degrees) on the nth day, and n∈[1,365] is the day number starting from January 1st. Then, the solar declination δ at mid-month is used as the basis for further calculations. m Suggested pitch angle:

[0107]

[0108] Where, β T (m) represents the target elevation angle (in degrees) for the m-th month, δ m β is the mid-month declination (degrees) of month m. min ,β max These represent the lower and upper limits (in degrees) of the pitch angle, respectively. `clamp(·)` limits the value within the parentheses to the given range. At the end of the empirical link, β... T Rounding to 0.5°, γ T Round to 1° and include source information.

[0109] In the energy optimization process, it is necessary to transpose "horizontal irradiation" to "module plane" and apply efficiency corrections for temperature effects to construct the energy objective function. The incident geometry of the module plane adopts a common projection relationship:

[0110] cosθ i (t;β,γ)=sinα(t)cosβ+cosα(t)sinβ·cos(A(t)-γ);

[0111] Where, θ i (t; β, γ) represent the incident angle (radians or degrees) at time t; α(t) represents the solar altitude angle (radians or degrees); A(t) represents the solar azimuth angle (radians or degrees); β represents the candidate elevation angle (radians or degrees); and γ represents the candidate azimuth angle (radians or degrees). An isotropic sky model is used, with the component plane direct, scattered, and ground reflection components as follows:

[0112]

[0113] Where DNI(t), DHI(t), and GHI(t) represent the direct, scattered, and total horizontal irradiance (W / m²) at time t, respectively. 2 );ρ g Surface albedo (dimensionless, typically 0.2–0.3). Considering the shading factor S(t), the total planar irradiance (POA) of the module is:

[0114] POA(t)=[Beam(t)+Diffuse(t)+Ground(t)]·[1-S(t)];

[0115] Wherein, POA(t) is the component planar irradiance (W / m²) at time t. 2 S(t)∈[0,1] represents the degree of shading (dimensionless, 0 for no shading, 1 for complete shading). Temperature effects are estimated using NOCT approximation to estimate cell temperature and correct for efficiency.

[0116] η(t)=η STC ·[1+α p ·(T cell (t)-25℃)];

[0117] Among them, T cell (t) represents the cell temperature (°C); T amb η(t) represents the ambient temperature (°C); NOCT represents the nominal operating temperature (°C); η(t) represents the time efficiency (dimensionless); η STC The nominal efficiency (dimensionless); α p This represents the temperature coefficient (1 / ℃, usually negative). It is a time series representing the entire year or seasonal months. For the window, construct a periodic energy objective function:

[0118]

[0119] Where E(β,γ) is the periodic energy (Wh or kWh) at the candidate pitch angle β and azimuth angle γ; Δt is the time step (h); This is a set of time indices. If a specific time period needs to be emphasized (e.g., 9–17:00), a weight w(t) ≥ 0 can be introduced to obtain a weighted objective.

[0120]

[0121] Among them, E w (β,γ) represents the periodic energy (Wh or kWh) with time-weighted values; w(t) represents the time-weighted value (dimensionless). A robust grid search is employed for the solution: without roof constraints, a discrete set is constructed for γ in the south-facing neighborhood and interposed with β∈[β]. min ,β max A two-dimensional search network is formed; when there is a roof constraint, γ = γ is fixed. roof Or, by fine-tuning only in its neighborhood, it simplifies to a one-dimensional search of β; taking E or E w The largest (β) T ,γ T ), and for β T Round down to 0.5° and adjust for γ. T Round down to the nearest 1°. For seasonal optimization, apply this to the window for each season or month. Solve independently and output the corresponding β. T ,γ TIf the user does not wish to adjust frequently, they can output only two levels: "Winter / Summer" or three levels: "Winter, Summer, Spring / Autumn". To prevent result jitter, if the newly calculated β... T If the value differs from the previous recommendation by less than 1°, the old value can be retained; for the monthly series {β} T (m)} can also be used to perform a three-point moving average.

[0122] Finally, boundary conditions and missing data are addressed: In high-latitude or strong wind load scenarios, when the optimized β... T When exceeding the structural allowance, it should be done according to [β] min ,β max Limit the amplitude and record the "limited optimal"; when GHI / DNI / DHI or temperature loss exceeds the threshold, automatically fall back to the empirical link; when the roof cannot face south / north, fix γ. T =γ roof It is also possible to obtain the optimal β relative to that orientation. T The system uses β T ,γ T Along with the source markers for "experience / optimization / constrained optimality", amplitude limiting information, and relative... The estimated percentage of revenue is written to the attitude log and simultaneously transmitted to the next target shadow calculation module to ensure that subsequent AR anchoring and unidirectional approximation convergence can operate in a closed loop under the same target attitude. Through the above overall structure, component composition and implementation details, S3 can stably produce β, which is strictly defined by the formula, under three typical field conditions: "no data - weak data - strong data". T ,γ T It can directly connect to subsequent steps to complete the installation and calibration in one go.

[0123] S4. Calculate the target shadow trajectory on the panel plane.

[0124] To ensure the project's feasibility and ease of integration with subsequent AR anchoring, the coordinate system and input quantities are first defined. Then, directly calculable vector and length formulas are provided, with the meaning and value conventions of each symbol immediately defined after each formula. Finally, numerical robustness, boundary conditions, and the output organization in the panel plane coordinate system are explained. The entire paper assumes that the alignment rod is strictly aligned with the panel normal (this is satisfied after installation or S0 calibration), therefore, no further perpendicularity compensation is needed in S4.

[0125] like Figure 7 First, two coordinate systems are established: the world coordinate system is an East-North-Sky (ENU) right-handed system, denoted as e. E =(1,0,0), e N =(0,1,0), e U = (0,0,1); Panel plane coordinate system Σ p Take the origin at the center of the alignment rod base, u p With vp Along the two orthogonal edges of the panel, where n is the panel normal, satisfying {u p ,v p The input variables are orthogonal, normalized, and right-handed, including the target mounting attitude (β). T ,γ T ) and the current solar position parameter (α, A). Where β T γ is the panel pitch angle, defined as the angle of elevation of the normal relative to the horizontal plane; T α is the azimuth angle of the panel normal, using a clockwise notation starting from true north (North = 0°, East = 90°, South = 180°, West = 270°); α is the solar altitude angle, defined as the angle of elevation of the sun relative to the horizon; A is the solar azimuth angle, using the same notation as γ. T The same orientation notation is used. To ensure consistency with the output of S2, angles are always calculated in radians and used in trigonometric functions, while they are presented in degrees at the human-machine interface layer (display and recording).

[0126] Based on the angle definition above, first express the target installation attitude and the sun's position as unit vectors in the world coordinate system. The panel normal unit vector is...

[0127] n=(sinβ T ·sinγ T sinβ T ·cosγ T ,cosβ T );

[0128] Where n is the unit vector of the panel normal; β T γ is the target pitch angle (in radians); T Let β be the target azimuth angle (in radians). This formula guarantees that when β... T When n = 0 (panel horizontal), n = e U When γ T =180° and β T When the value is greater than 0, the horizontal component of the normal points due south. The unit vector of the direction of solar incidence is...

[0129] s=(cosα·sin A, cosα·cos A, sinα);

[0130] Where s is the unit vector pointing from the observation point on the panel to the sun; α is the solar altitude angle (in radians); and A is the solar azimuth angle (in radians). This formula ensures that when the sun is due south at its zenith (in the Northern Hemisphere), α reaches its maximum, A = 180°, and the northward component of s is negative.

[0131] To obtain the direction of the shadow on the panel plane, first calculate the projection component of the sun's direction onto the panel plane. The incident angle satisfies cosθ. i =s·n; where θ iCosθ represents the angle (in radians) between the sunlight and the normal to the panel; "·" represents the dot product of vectors; cosθ i >0 indicates that the sun is on the "sun-facing side" of the panel. The projection vector of the sun's direction onto the panel plane is s. || = s - (s·n)n; where s || Let s be the plane Σ of the panel. p The components within the projection (represented by world coordinates). The unit vector of the target shadow direction is taken as the inverse normalized form of the projection.

[0132]

[0133] in is the unit vector (expressed in world coordinates, located in the panel plane) of the target shadow direction; ‖·‖ is the Euclidean norm; the negative sign indicates that the shadow direction is opposite to the incident projection direction ("shadow follows the light direction"). When ‖s || || = 0 (i.e., θ) i When =0), the sunlight coincides with the normal, the direction of the shadow is uncertain but the length of the shadow is zero.

[0134] The target shadow length can be obtained directly from the incident angle, or it can be expressed as the ratio of the projection to the normal component. Let the height of the alignment rod be denoted as h (the effective length along n), then the shadow length satisfies L T =h tanθ i ; where L T θ represents the length of the target shadow, in the same unit as h (millimeters or meters); i Same as above. To avoid numerical instability, an expression equivalent to the ratio of the projected components can also be used.

[0135]

[0136] Where the denominator s·n=cosθ i Only in cosθ i This holds true when cosθ > 0 (on the side facing the light); i When the value is ≤0, it is in backlight mode, and the front surface does not form an image (no effective shadow). In the implementation, it should be marked as "unavailable" and the user should be prompted to adjust the time or orientation.

[0137] To project the orientation in world coordinates onto the local coordinates of the panel plane (for ease of use in Σ) p The given values ​​(and anchoring in AR) require the construction of Σ. p orthogonal basis {u p ,v p A robust and geometry-independent construction method is to first select a reference vector r (by default r = e). U When r and n are nearly collinear, use r = e E ), then let

[0138] v p =n×u p ;

[0139] Where "×" represents the cross product of vectors; u p With v p Let {u} be two mutually orthogonal unit vectors in the panel plane that are also orthogonal to n (in world coordinates). This results in {u} p ,v p ,n} is the column vector of the direction cosine matrix from the panel to the world. The target shadow direction and length are written in Σ p From the component form, we can obtain

[0140]

[0141] Where e u ,e v The target shadow direction is in u p With v p The direction cosine on the axis (dimensionless); The target shadow vector in the panel plane coordinate system (two-dimensional column vector, unit same as L) T In the numerical implementation, [e u ,e v This is equivalent to using world coordinates. Left multiplication The 2×3 projection matrix.

[0142] Considering the robustness and boundary conditions of the implementation, the cosθ condition for facing the light should be checked before entering the calculation. i =s·n>0, if not satisfied, return to the "backlight" state and do not give L. T (or let L) T (Invalid value NaN); secondly, near parallel incident (cosθ) i When tanθ is very small, i With ||s || The value of || / (s·n) will be amplified; it is recommended to set a lower limit for cosθ. i ≥ε (e.g., ε=0.05) to avoid the shadow length from increasing dramatically and affecting the operator's judgment, and to display the message "Incidence too shallow, it is recommended to calibrate at a different time" on the interface; again, at θ i When it is very small, the direction should still rely on s || Normalized But length L T It can be treated as zero, and the interface will display "shadow length ≈ 0". If the system needs to overlay with AR, the calculated value will be... The homography transformation H will be performed from Σ in S5. p Mapped to the image plane Π i This will not be elaborated upon here.

[0143] To facilitate software and hardware integration, a one-step implementation sequence is provided. The first step consists of (β) T ,γ T Calculate n and s (in radians) using (α, A); second step: calculate cosθ. i =s·n, if cosθ i If ≤0, return to backlight state and terminate S4; the third step is to calculate s. || =s-(s·n)n and normalize to get The fourth step uses tanθ i or ||s || ‖ / (s·n) multiplied by the rod height h gives L T and for cosθ i Perform numerical clamping for cases <ε; the fifth step is to construct u according to the above formula. p ,v p Find (e) u ,e v )as well as The final output "target shadow trajectory parameters" should contain at least a direction unit vector. (or in Σ) p Two-dimensional components [e u ,e v ]) and target length L T One or two of the options; in scenarios requiring complete geometric reference, it is preferable to output both simultaneously so that both direction convergence and length matching can be performed in S6 / S7. In this way, under the premise that "the alignment rod is consistent with the panel normal", S4 provides a deterministic geometric mapping from the attitude and sun position to the target shadow on the panel plane, which satisfies mathematical rigor and is also easy for the software to implement directly and for the on-site operator to use intuitively.

[0144] S5, AR anchoring and displaying target trails

[0145] like Figure 8 In terms of overall structure, the core task of this step is to pre-arrange planar reference markers on the surface of the solar panel, making the panel plane an "observable geometric reference." The mobile terminal camera captures images in real time, performs sub-pixel positioning and matching of the marker corner points, thereby estimating the attitude of the panel plane in the camera coordinate system. Then, the target shadow trajectory parameters output by S4 are mapped onto the camera image plane using homography transformation, and finally accurately superimposed on the real panel area in the form of graphics or augmented reality. To achieve engineering-usable stability and accuracy, the process first corrects for in-camera lens distortion before the image enters the calculation. During the solution process, robust estimation (such as RANSAC) is used to resist occasional false detections and occlusions. Before output superposition, thresholds such as reprojection error, attitude drift, and anchoring consistency are set. If the threshold is exceeded, superposition is paused and a prompt is given to re-framing or rebuilding the anchor.

[0146] On the components and data, at least three, preferably four or more, high-contrast planar reference markers (e.g., checkerboard or ArUco / AprilTag) are uniformly affixed to the panel surface, with each marker positioned in the panel's planar coordinate system Σ. p It has predefined two-dimensional coordinates (With the alignment rod base as the origin and the two sides of the panel as the coordinate axes), the mobile terminal camera outputs distorted pixel coordinates. Before computation, distortion correction is performed, mapping pixels from the distortion domain to the ideal imaging domain. The commonly used Brown–Conrady model can be represented as follows:

[0147]

[0148] Where (x) d ,y d (x, y) are the distorted normalized coordinates, (x, y) are the ideal normalized coordinates, and r 2 =x 2 +y 2 k1, k2, k3 are radial distortion coefficients, and p1, p2 are tangential distortion coefficients. All distortion parameters and the camera intrinsic matrix K (focal length and principal point) are fixed in the application configuration after one-time calibration; in actual implementation, a ready-made anti-distortion function is usually called to... Transform into u i And use K to perform pixel normalization plane conversion.

[0149] Marker detection and sub-pixel corner localization are performed on the distortion-corrected image to obtain the pixel coordinate set {u i Its correspondence in the panel coordinate system Since the panel is a strictly single plane, there is a homography relationship between the panel plane and the image plane.

[0150]

[0151] in and Here, we have homogeneous coordinates (the third dimension is 1), and "~" indicates homogeneity; H is a 3×3 homography matrix; K is the camera intrinsic parameter matrix; r1 and r2 are two orthogonal rotation column vectors of the panel plane coordinate basis in the camera coordinate system; t is the translation vector of the panel origin in the camera coordinate system. In practice, we first use normalized DLT combined with RANSAC to... Solve for H, then transform H from the pixel domain into planar pose parameters (r1, r2, t) in the camera coordinate system through polar decomposition. Apply orthogonal constraints to make r1 and r2 orthogonal and together with r3 = r1 × r2 form a rotation matrix R = [r1 r2 r3]. After completing this process, the mapping kernel from panel plane coordinates to image pixel coordinates is obtained.

[0152] Write the target shadow trajectory parameters given in S4 into the panel plane coordinate system, usually starting from the alignment rod base. Using the target shadow 2D vector For displacement, obtain the endpoints Using the homography matrix, the start and end points are mapped onto the image plane to obtain...

[0153]

[0154] in For homogeneous pixel coordinates, These are the actual pixel coordinates. This is the homogeneous normalization factor. If the target tolerance band still needs to be displayed in the interface, the tolerance half-width ε can be superimposed along the normal direction. On both sides, construct the endpoint sets of two offset lines parallel to the target line segment and obtain two envelopes by H projection. Fill the image plane with semi-transparent color blocks to assist the operator in judgment.

[0155] When overlaying augmented reality data, visual parameters such as arrow direction and line width must also be provided. The arrow direction is directly determined by u0→u1, and the arrow length can be a certain proportion of the line segment length (e.g., 8%–12%). The two points of the arrow's base can be extended outward on the image plane at a fixed angle (e.g., 20°–25°) to form an isosceles triangle. The line width can be adaptively adjusted according to the proportion of the shorter side of the image resolution (e.g., 0.2%–0.4% of the shorter side) to ensure similar readability on different terminals. If a 3D AR framework (ARCore / ARKit, etc.) is used, the panel plane can be rendered with a quadrilateral mesh, and the target shadow texture can be drawn on its local UV coordinates. Then, the framework can complete the camera pose-driven projection. However, under strict engineering control, directly using H to overlay in the 2D pixel domain is more transparent, has lower latency, and is consistent with the geometric reflection of S7.

[0156] To ensure the stability and reliability of the superposition, a quality control threshold and a time-domain filtering strategy need to be defined. For quality control, the reprojection error of the marker corner points is first calculated.

[0157]

[0158] Where e iLet be the pixel reprojection error (in pixels) of the i-th corner point, π(·) represent the normalization from homogeneous coordinates to pixel coordinates, and N be the number of available corner points. Use the mean or median as a robustness indicator; when If the threshold is exceeded (e.g., 0.8 pixels) or the number of effective corner points is below the lower limit (e.g., less than 3 non-collinear points), the stacking and error calculation should be paused and a reframing prompt should be given. Secondly, monitor the homography changes between adjacent frames. Rotational angular velocity and translational velocity can be calculated in R,t space. When the smoothing threshold is exceeded, anchoring should not be updated temporarily to avoid flickering caused by rapid camera movement. For temporal filtering, it is recommended to perform exponential smoothing or Kalman filtering on the attitude parameters (R,t) extracted from H, and then reassemble them into H for stacking. Directly performing linear interpolation on H will destroy its projection geometry; therefore, a more reliable approach is to use Lie algebra or quaternion interpolation for rotation and linear interpolation for translation, and finally multiply by K to generate a new H.

[0159] In coupling with S4, this step assumes the alignment lever is aligned with the panel normal, therefore the target shadow endpoint is at Σ. p The construction in S0 is fixed; if a small tilt angle is estimated in the optional S0, it should be calculated using the corrected normal before entering S4. S5 is only responsible for accurately mapping it to Π. i And overlay the display. A "geometry lock indicator" can also be added to the graphics layer, for example, when... When the visibility is below the threshold and the corners remain stable, the four sides of the panel are outlined with a green border. When the visibility exceeds the threshold or decreases, a yellow or red warning is issued and error readings are paused. To improve stability under low light or strong reflection conditions, the markings in non-power-generating areas of the panel should have a matte finish and sufficient side length. The software can lock the exposure or use a local adaptive threshold when entering the viewfinder, and prompt the user to change the shooting angle to reduce specular highlights if necessary. When the illumination is too low, the shadow contrast is too weak, or the obstruction area is too large, the application should decisively prohibit the "successful placement" judgment to avoid installation deviations caused by misjudgment. Through the above integrated method, under the constraint of the reference markings, S5 uses interpretable and verifiable projection geometry to robustly anchor the target shadow trajectory of S4 onto the actual panel plane area, providing a reliable visual reference for subsequent direction / length convergence and final "placement" judgment.

[0160] S6, User coarse adjustment and orientation adjustment

[0161] The goal of this step is to allow the user to adjust the panel's pitch angle to the target pitch angle β using the pitch angle scale on the bracket, given that the target installation attitude is known. TThen, the azimuth angle is adjusted only around the vertical axis to make the direction of the actual alignment rod shadow on the panel plane consistent with the target shadow displayed by the S5 anchor. If necessary, a very small pitch adjustment is made to eliminate residual length error. The whole process follows the "one-way approximation" operation principle to suppress the mechanism's return stroke, and with the application's real-time prompts and quality thresholds, it ensures one-step completion and repeatability.

[0162] like Figure 9 As described, in the overall process, the user first completes on-site preparation: checking whether the bracket base is firmly connected to the ground / roof, confirming that the pitch angle indicator, pawl discrete positioning, and lead screw fine-tuning mechanism are working properly, and loosening the azimuth locking device while maintaining light damping to ensure that it can rotate around the vertical axis without becoming loose. Then, the user opens the application and enters the S6 interface to confirm the β output of S3. T ,γ T The target image generated by S4 / S5 has been loaded and stably superimposed on the panel area, and the pose reprojection error is within the allowable range. If S5 prompts "backlight" or "incident too shallow," recalibrate at a later time; do not force the operation. To avoid backtracking, the pitch angle adjustment should always approach the target value unidirectionally from a smaller angle, and the azimuth angle adjustment should also maintain unidirectional rotation, avoiding repeated crossings within the convergence window.

[0163] During the pitch angle adjustment process, the user first uses the ratchet mechanism to coarsely position the pitch angle to be close to β. T The gear is then continuously fine-tuned using the lead screw until the target reading is reached. If the lead screw pitch is p (unit: mm / revolution), and the equivalent force arm from the lead screw's point of action to the pitch axis is l (unit: mm), then under a small angle approximation, the change in pitch angle per revolution of the lead screw can be approximated as...

[0164]

[0165] Where Δβ is the change in pitch angle (degrees / revolution), p is the linear displacement of the lead screw per revolution (mm / revolution), and l is the vertical distance from the point of force application on the lead screw to the shaft (mm). Based on this, users can "quantitatively sense" the required number of revolutions or fractions, allowing the scale to quickly approximate β. T After fine-tuning, first tighten the fasteners on the pitch side, then reread the scale to confirm that the pointer has not regressed due to tightening. It is recommended to perform a cross-calibration using the IMU of a mobile terminal: place the phone flat on the panel and read the pitch angle β. phone If the zero-point difference κ0 between the phone and the bracket scale was obtained during the initial calibration, then the "true reading" of the pitch angle can be taken as β. true =β phone +κ0; where β true κ0 is the pitch angle (degrees) corrected based on the mobile phone reading, κ0 is the zero-position deviation (degrees) established at S0 or during initial use, and β is... phoneThis represents the current IMU reading (degrees) on the mobile phone. When |β true -β T If the pitch angle is less than a preset threshold (e.g., 0.5°), the azimuth adjustment can begin; if it exceeds the threshold, the lead screw will continue to be finely adjusted in a unidirectional manner according to the above formula, so that the pitch angle falls back into the tolerance zone.

[0166] During the azimuth adjustment around the vertical axis, the previously set pitch lock should be maintained at all times to avoid coupling errors caused by "changing pitch while rotating azimuth". Observe the relative direction difference between the actual shadow principal axis of the alignment rod and the target shadow using the AR overlay in the application, and slowly adjust the rotation direction using a "one-way approximation" method. To quantify the actions of "how much more to rotate and in which direction", the application should use a unit vector of the current shadow direction. Unit vector of the target direction In the panel plane coordinate system Σ p Calculate the angle between the vectors of the two-dimensional components: Where Δψ is the azimuth increment (in degrees or radians, with the symbol indicating clockwise / counterclockwise direction) that needs to be adjusted; For the actual shadow direction in Σ p The x / y components (dimensionless); For the target direction in Σ p The x / y components are dimensionless; atan2(y,x) returns the signed angle between values ​​in (-π,π]. The application converts Δψ into a natural language prompt of "rotate left / right by a certain number of degrees" and provides suggested step sizes (e.g., when |Δψ|>3°, it is suggested to adjust with a step size of 1° to 2°; when |Δψ|≤3°, it is suggested to iterate with a small step size within 0.5°). The user rotates slowly according to the prompt and waits 1 to 2 seconds after each step to allow the shadow to stabilize, avoiding misjudgments caused by wind vibration or hand tremors. To adhere to the unidirectional approximation principle, if "right" is initially selected as the convergence direction, it will not be changed to "left" within the convergence window to prevent the structure from swinging back and forth between the two sides of the target due to structural backlash.

[0167] When the orientation error has been reduced to a threshold (e.g., |Δψ|≤1°) but the shadow length still has a significant deviation, a very small pitch adjustment can be made while maintaining azimuth lock to eliminate the length error. The theoretical target for shadow length is L. T The actual shadow length, calculated by S4, is L, and the residual ΔL = LL. T When the pitch is fixed at β T When the sun's position remains relatively constant in the vicinity for a short period, small changes in pitch are approximately linear with shadow length, allowing for quantitative guidance using first-order sensitivity.

[0168]

[0169] Where Δβ is the suggested pitch fine-tuning amount (in radians or degrees), which can be expressed as an "approximation" on the right for simplicity in actual operation; ΔL is the shadow length residual (in the same unit as h); h is the effective height of the alignment rod (mm or m); θ i This is the angle of incidence (in radians or degrees). Intuitively, it means: a steeper incident angle (θ) i When the angle is small (θ), the shadow length is less sensitive to elevation, and fine adjustments should be made in smaller increments; when the incident angle is shallower (θ), the shadow length is more sensitive to elevation, and fine adjustments should be made in smaller increments. i When the shadow length is large, it is very sensitive to pitch. Smaller movements should be controlled, and residuals should be eliminated by directional convergence rather than large pitch. If the ambient light is weak, there is backlighting, or the S5 reprojection error alarm is triggered, the shadow length reading is easily affected by noise, and it is not recommended to make fine adjustments based on this.

[0170] During the tightening and verification process, the azimuth and pitch fasteners must be tightened one by one according to the manufacturer's specifications. The tightening order should preferably be azimuth first, followed by pitch, or follow the recommended order in the equipment manual. After each tightening, check the scale and application readings for any backlash. If backlash occurs, make small adjustments according to the same direction to compensate within the tolerance range, and tighten again until stable. After completion, save the "Attitude Log" in the application, including time, location, and β. T ,γ T The final orientation / length error, whether amplitude limiting occurred, and a field snapshot are recorded for subsequent resetting or maintenance. For easier resetting, weather-resistant markings can also be used on the support to mark alignment at the current azimuth and elevation positions.

[0171] In handling special installation geometry, if the azimuth and pitch of the support are coupled (for example, some roof chute structures will slightly change pitch when rotating azimuth), a step-by-step approach can be used: first adjust the pitch to β. T Then lock it, make a small azimuth adjustment until the direction error |Δψ| ≤ 2°, then check the pitch scale again and return it to β using the lead screw compensation. T Then continue refining the orientation until |Δψ|≤1° and the shadow length residual |ΔL| falls within the threshold. If the site is windy or the panel size is large, it is recommended that two people work together, one holding the end support to reduce vibration, and the other performing fine adjustments according to the application prompts.

[0172] Regarding quality and safety control, threshold management should always be followed: when the average error of the S5 marking reprojection exceeds the threshold, the number of corner points is insufficient, or the illuminance / contrast is below the threshold, readings should be paused and a "temporarily suspend adjustment" prompt should be given to avoid "aligning with an incorrect reference." Fastener torque should adhere to the manufacturer's specifications to avoid overtightening causing thread damage or undertightening causing displacement drift; anti-glare protective gear should be worn when operating under strong sunlight to prevent glare from specular reflections. Under all conditions, the final completion indicator for S6 is: pitch scale and / or IMU calibration display |β-β T|≤0.5°, directional angle|Δψ|≤1°, shadow length residual|ΔL| does not exceed the set proportional threshold (e.g., not exceeding L). T The pitch and azimuth of the panel are at 5% of the target value, and remain stable without reversal within a time window of 1.5 to 3 seconds. At this point, the panel's pitch and azimuth have been determined in a "one-way approximation" manner, and can proceed to the S7's shadow detection and quantization convergence verification, or generate a completion report directly in the application.

[0173] S7. Actual Shadow Detection and Vector Error Calculation

[0174] This step, based on the stable planar pose and homography matrix already obtained in S5, uses a mobile terminal to process the real-time image, detecting the "alignment rod and its actual shadow vector on the panel plane," and quantifying and comparing it with the target shadow trajectory parameters output by S4 to obtain the direction error, length error, and overall error, which are used for subsequent unidirectional approximation and convergence determination. The entire paper adopts the same notation system as before: the panel plane coordinate system is denoted as Σ. p The panel normal is n, and the target parameters given by S4 are the direction unit vectors. With target length L T The homography matrix is ​​H (from Σ p To the image plane Π i The camera intrinsic parameter is K.

[0175] like Figure 10 First, geometric preparation is performed to unify the observations onto the panel plane. For each frame, planar shaping is performed using the homography matrix of S5 to correct the perspective of the original image to a "top-down panel view," resulting in a rectangularized, metrically consistent panel image I. p This process utilizes inverse homography mapping. in For pixel homogeneous coordinates, For Σ p In the homogeneous coordinates, "~" indicates a homogeneous equivalence relation; H -1 This is the inverse of the homography matrix. For engineering measurement purposes, a fixed "mm / pixel" ratio s (e.g., 1.0 mm / px) is selected during shaping, and scaling is performed based on at least one known physical dimension, such that I... p The Euclidean distance on the surface corresponds proportionally to the actual distance on the panel.

[0176] Next, in panel view I p Shadow visibility and preprocessing are performed. The luminance channel is extracted using RGB→Lab or RGB→HSV transformation (e.g., Lab's L). *Alternatively, for the channel V in HSV, perform Contrast-Limited Adaptive Histogram Equalization (CLAHE) and large-scale guided filtering to obtain a gradually changing background B, forming a shadow enhancement map S = clip(BL, 0, 255); where L is an 8-bit image of the luminance channel, B is a smooth background of the same size, and S is the intensity map that highlights dark bands after suppressing highlights and textures, in gray levels (0–255). To suppress specular reflections and overexposed areas, a threshold V > V can be set in HSV. max Or in Lab with L * >L max Construct a "spectral mask" and remove it from subsequent calculations. If the oncoming light condition of S4 is not met (i.e., cosθ...), then... i If the error is ≤0), or the average reprojection error of S5 exceeds the threshold, or the overall contrast of the current frame is lower than the threshold, "Unavailable" will be returned directly, and a prompt will be made to change the view or time period.

[0177] Then, a region of interest and directional prior are established near the alignment rod base. The Σ of the alignment rod base... p Coordinates are The pixel position p0 in the integer image is obtained by mapping it to the rendering scale. A circle with p0 as the center and an inner radius r is then drawn. min With outer radius r max A circular area (e.g., 10–200 pixels) is used as the shadow search band, and the target direction of S4 is used. Create a corner window ±Δφ (e.g., ±30°) around the center to form a "fan-shaped ROI". Within this ROI, the principal shadow axis should be a "dark, elongated structure" extending from p0, in line with... The included angle is relatively small.

[0178] For shadow axis extraction, to balance robustness and real-time performance, a "two-channel redundancy" detection strategy can be adopted: one path uses the edge-line method, and the other path uses the region-skeleton method. The two methods are cross-validated, and the optimal one is output. The edge-line method first performs Canny edge detection on S, and then uses probabilistic Hough line detection in the ROI to obtain parameter pairs. The candidate set is selected based on the following criteria: the line must pass through or approach the neighborhood of p0 (e.g., within a radius of 6–10 pixels) and its angle... If multiple paths fall into the corner window, the one with the largest length or the largest contrast integral along the line is selected. The region-skeleton method first uses a local adaptive threshold (e.g., Sauvola) to binarize S to obtain a dark band mask. Then, it performs thinning / skeletonization and performs a directed connectivity search with p0 as the source to obtain the strongest connected branch extending from p0 within the corner window. Finally, it performs least squares or Theil-Sen line fitting on this branch to obtain the direction. If the angle difference between the outputs of two paths is less than a threshold (e.g., 5°), the direction can be weighted by confidence; if the difference is large, the path with higher contrast and smaller residual is selected.

[0179] The obtained shadow principal axis direction is in Σ p In this context, it is represented as a unit vector. To ensure that the direction "points to the outer edge of the shadow rather than back to the base", The sign is determined by the criterion; if it is negative, then let... Length estimation is done in the shaping graph: along Starting from p0, perform one-dimensional radial sampling to form an intensity profile s(l) (l is the pixel distance from the base along the main axis). An adaptive threshold T(l) = μ can be constructed using the local mean and standard deviation. l -kσ l ;where μ l With σ l The intensity mean and standard deviation within a sliding window centered at l and with width w are expressed in gray levels; k is an empirical coefficient (e.g., 0.5–1.0). The farthest continuous interval of s(l) ≤ T(l) is taken as the shadow endpoint, yielding the pixel length L. px The physical length L can be converted from the shaping scale s (mm / pixel) to L = s·L px Where L is the actual shadow length (millimeters or meters), s is the pixel physical scale (millimeters / pixel), and L px The length is in pixels. To improve the stability of the length, a directional distance transformation can be performed on the binary mask within a narrow strip near the main axis, or sub-pixel interpolation along the darkest position of the line can be used to avoid overestimation caused by isolated noise.

[0180] get After L, define the "actual shadow vector" in the panel plane coordinates as Where v is a two-dimensional column vector (and Σ) p (The axis is consistent, and the unit is the same as L). Let L be the unit direction vector (dimensionless), and L be the length (millimeters or meters). This is related to the target parameters of S4. Compare and define direction error and length error. ΔL=LL TWhere Δθ is the directional angle error (radians or degrees), and its value is non-negative; "·" represents two-dimensional dot product; clip(·) is used for numerical clamping to avoid floating-point overflow; ΔL is the length residual (in the same unit as L). To comprehensively reflect the "alignment degree" in a scalar, a weighted normalized comprehensive error norm is used.

[0181]

[0182] Where ||e|| represents the dimensionless composite error; w θ ,w L The weights for direction and length (dimensionless, the sum can be 1 or each can be set independently, such as 0.7 / 0.3); L ref For reference length (millimeters or meters, h or L), please refer to the length. T This scalar is used both for the convergence criterion of S8 and for easy display on the interface as a single progress bar.

[0183] To ensure measurement reliability, the detection confidence level and quality threshold need to be provided. For geometric anchoring quality, the mean reprojection error of S5 is used. Thresholds are set for (pixels) and the number of visible corner points N; for shadow intensity, the contrast index within the main axis strip is used.

[0184]

[0185] Assess the depth of shadows relative to the background, where μ bg The mean gray level of the background bands on both sides of the main axis, μ sh The mean gray level on the main axis, ∈ is a small value to prevent zero; when C is below the threshold or When the threshold is exceeded, or N < 3, freeze the output of Δθ and ΔL and display the message "Insufficient lighting / Poor framing". For high-frequency disturbances in the time series caused by wind or jitter, use exponential smoothing. in This is a smoothed estimate of time t, where λ∈(0,1] is the smoothing coefficient, typically taken as 0.3–0.6. Smoothing is only used for display and convergence criteria; the original instantaneous values ​​can still be used for log recording.

[0186] Considering that the visible line segments of the alignment rod in the image may be confused with the panel shadow, the algorithm sets a "rod strip" inside the fan-shaped ROI (close to p0), with a width slightly larger than the projected width of the rod diameter. Any high-contrast vertical line segments located within this strip and related to the lens polarity are ignored, and only the "dark strip attached to the panel" is fitted. If the scene has secondary shadows (such as penumbra caused by the chamfer of the rod end) or texture interference, the region-skeleton method refines the binary mask and uses connectivity and straightness (the ratio of the first eigenvalue to the second eigenvalue of the principal component) as filtering criteria, which can effectively remove discrete noise clusters.

[0187] To form an "executable instruction" with the operation of S6, after obtaining Δθ, ΔL, and ||e|, the application converts the direction error into a prompt of "turn left / right and then |Δψ|", where Δψ and Δθ are in Σ p The definition framework remains consistent; the length residual is converted into a prompt to "keep the azimuth fixed and fine-tune the pitch Δβ", where Δβ can adopt the approximate sensitivity relationship given in S6. The interface also displays the tolerance band, allowing the user to iterate in small steps under the constraint of "one-way approximation" until the convergence criterion of S8 is met.

[0188] Through the above process, S7 is in the same metric space (Σ) p Within millimeter coordinates, it stably maps the "shadow phenomenon in the image" to "comparable vector measurement", and provides two types of errors, direction and length, as well as a comprehensive error with adjustable weights, with clear mathematical definitions, providing a reliable quantitative basis for the convergence and positioning determination of S8.

[0189] S8 One-Way Approximation and Convergence Determination

[0190] Based on the vector error between the "actual shadow vector" output by S7 and the "target shadow trajectory parameters" by S4, a manual adjustment command for unidirectional approximation is automatically generated (only giving the action of "moving in a fixed direction, small steps to the desired position"), thereby suppressing the influence of the support mechanism's return stroke on the final attitude; when the error meets the preset tolerance and convergence criteria, the calibration is considered complete. To facilitate engineering implementation, the following is presented in the order of "error measurement - quality threshold - unidirectional approximation strategy - step size and anti-boundary measures - convergence criteria - anomaly / degradation handling - completion and recording", with parameters defined immediately following the formulas.

[0191] like Figure 11 First, a unified vector error metric is established. Assume S7 has already obtained the panel plane coordinate system Σ. p The actual unit direction vector below S4 gives the target unit direction vector, relative to the actual length L. With target length L T Then the directional angle error and the length residual are defined as follows: ΔL=LL T Where Δθ is the direction error (radians or degrees); ΔL is the length error (in the same unit as L); "·" represents the two-dimensional dot product; clip(·) clamps the floating-point value to [-1, 1]. To synthesize the two types of errors into a single criterion, a weighted normalized norm is introduced.

[0192]

[0193] Where ||e|| represents the dimensionless composite error; w θ ,w L Direction / length weights (dimensionless, such as w)θ =0.7,w L =0.3); L ref Reference length (can be L) T Or the height of the rod, h (same unit as L).

[0194] Next, a quality threshold is set to determine whether to generate a command. A command is only issued when the S5's reprojection mean error does not exceed the threshold, shadow contrast is sufficient, and the oncoming light condition is met. C≥C min cosθ i >0; where, The average reprojection error (in pixels) is used to identify corner points. Its upper limit (e.g., 0.8 pixels), C is the shadow relative contrast index (dimensionless), C min Its lower limit (e.g., 0.08–0.12), θ i The angle of incidence (see S4) is "facing the light," which is cosθ. i >0.

[0195] Next, the fixed rotation / pitch direction for unidirectional approximation is determined. Upon initial entry into S8, the suggested rotation direction is obtained from the "signed azimuth difference" calculation formula in S7; thereafter, it remains unchanged throughout the entire convergence window, and reverse crossing of the target is prohibited.

[0196] Δψ=atan2(e T,x e y -e T,y e x ,e T,x e x +e T,y e y ),s ψ =sign(Δψ0);

[0197] Where Δψ is the current azimuth increment to be adjusted (in radians or degrees, with the symbol indicating left / right turn); s ψ ∈{+1,-1} represents a fixed rotation direction (initial value determined by the sign of Δψ0 in the first frame). The fixed pitch direction is initially determined by the approximate sensitivity relationship between the shadow length residual and the incident angle:

[0198] s β =sign(Δβ0);

[0199] Where Δβ is the suggested pitch change (in radians or degrees, approximated by L = htanθ). i First-order linearization (see S6), where h is the effective height of the rod, s β To fix the pitch direction.

[0200] The error is then converted into executable small-step instructions, and "crossing the target" is explicitly avoided. The azimuth step size adopts an adaptive saturation form, and a "guardrail amount" is set to prevent crossing the target in one step:

[0201] Δψ cmd =clip(k ψ |Δψ|,ψ min ,ψ max ),Δψ cmd ≤|Δψ|-ψ guard ;

[0202] Where, Δψ cmd k represents the suggested azimuth angle (in degrees) for this instruction. ψ ∈(0,1] is the proportionality constant (e.g., 0.6), ψ min ,ψ max For the minimum / maximum step size of azimuth (e.g., 0.3° to 2°), ψ guard To prevent people from crossing the boundary fence (e.g., 0.2°), the instruction text is: "Press s..." ψ Pointing, rotating Δψ cmd "Measurement, not in the opposite direction." The same applies to pitch and yaw step length:

[0203] Δβ cmd =clip(k β |Δβ|,β min ,β max ),Δβ cmd ≤|Δβ|-β guard ;

[0204] Where, Δβ cmd For the suggested pitch step (degrees), k β β is a proportionality constant (e.g., 0.5). min ,β max For the minimum / maximum pitch step (e.g., 0.2° to 1°), β guard For guardrails (e.g., 0.1°). A two-stage strategy is adopted in the execution sequence: first, several rounds of small azimuth steps are used to push the direction error into the threshold; then, as needed, 1-2 steps of minimal pitch fine-tuning are used to eliminate the length residual; unless L... T Very small (near zero shadow length, around noon), generally not both axes are adjusted significantly at the same time.

[0205] To suppress backhaul and noise, a constraint monotonic approximation is used, and a time window convergence criterion is introduced. The error sequence {‖e‖} over the most recent M frames (or τ seconds) is defined as follows: t The condition is required to be monotonically non-increasing (allowing for a very small increase μ) and its final value not exceeding a threshold:

[0206]

[0207] Where μ is the relaxation factor (e.g., 0.02), ε is the overall error tolerance (e.g., 0.1), and τ is the dwell time window (e.g., 1.5–3.0 s). Independent thresholds are also set for each component.

[0208] |Δθ|≤ε θ ,

[0209] Where, ε θ For the tolerance of the directional angle (e.g., 1°), ε L The relative length tolerance is 5%. When all the above conditions are met and the condition remains stable within τ, the condition is determined to be "in place".

[0210] To address the tendency to exceed limits and step size decay, if an "overshoot" sign (|Δψ| increasing or changing sign) occurs after executing a certain instruction, a reverse swing is not allowed; instead, the fixed rotation direction s is maintained. ψ And the next step Δψ cmd Reduce the amplitude to 1 / 2 to 1 / 3 of the original amplitude until monotonic descent is restored; the same applies to pitch. If monotonicity cannot be restored after K consecutive attempts (e.g., 3 attempts), the "microstep mode" is triggered, and ψ is adjusted accordingly. max ,β max At the same time, the value was reduced by 50%, and a reminder was given to check for mechanical loosening or wind vibration.

[0211] Consider degradation and anomalous scenarios. When it approaches noon, L... T ≈0 or low shadow contrast C <C min When the length measurement is unreliable, switch to "direction priority mode" and use only Δθ as the convergence factor, temporarily ignoring the length component in ‖e‖; when S5's If the threshold is exceeded, pause the command and prompt "Reframe / Re-anchor"; when wind-induced vibration causes high-frequency jitter in the error, use exponential smoothing.

[0212] Where λ∈(0,1] is the smoothing coefficient (e.g., 0.4), which is only used for display and judgment; the original value is still used in the log.

[0213] Regarding the completion of judgment and recording, once the above-mentioned comprehensive and component tolerances are met, and the calibration remains monotonically constant within the dwell time window τ, a "Calibration Complete" message will pop up. The application records the final attitude log: time, location, β. T ,γ T The system can record the final values ​​of Δθ, ΔL, and ||e|, the time window, whether the quality threshold is triggered, the maximum / minimum step size executed, whether degradation mode has been entered, and a snapshot of the site. To facilitate reset, the system can prompt the user to make physical markings on the support (position of azimuth and pitch scales).

[0214] After embedding the above method into the interactive interface, the user receives clear, executable, and always unidirectional small step instructions ("continue to move 0.8° to the right" or "pitch up 0.3°"). The system uses monotonicity and dwell as dual criteria to avoid "back and forth swinging". It can still converge steadily when there is retracement and noise, and finally achieve reliable positioning determination of the panel attitude.

[0215] As a further improvement, such as Figure 3 The invention further includes S0: calibrating and compensating for the perpendicularity of the alignment rod, specifically: determining the angular deviation between the alignment rod and the panel normal based on the horizontal bubble level at the rod base or camera visual angle measurement, and incorporating the deviation into the target shadow trajectory parameter calculation for compensation. The task of this step is to objectively observe the minute angular deviation between the actual alignment rod axis and the panel normal, under the premise that "the alignment rod should ideally be consistent with the panel normal," and to introduce this deviation into the target shadow trajectory parameter calculation in S4 using geometric compensation, so that subsequent steps operate on the "actual rod axis" rather than the "ideal normal," thereby avoiding systematic deviations caused by assembly errors. To facilitate engineering implementation and subsequent joint debugging, this paper first unifies coordinates and symbols, then provides two mutually redundant measurement paths (camera visual angle measurement method and bubble level angle measurement method), and finally explains how to write the measured rod axis vector into the shadow geometric formula to form the compensated target direction and length, and provides key points for robustness and consistency control.

[0216] First, unify the coordinates and input quantities. Using the panel plane's three-dimensional coordinate system as the reference, denote the orthogonal unit basis of this coordinate system as {u}. p ,v p ,n}, where u p ,v p Coplanar and aligned with two edges of the panel, n is the panel normal, and all three are right-handed orthogonal. The center of the alignment rod base is defined as the origin O = 0. The solar incidence direction in the world coordinate system (e.g., ENU) is given as a unit vector s by S2; the target mounting attitude is given by S3, which also equivalently gives the direction of n in the world system; S5 has already obtained the extrinsic parameters of the camera relative to the panel, thus allowing mapping between the panel system and the camera pixel plane. The core output of S0 is a "true rod axis unit vector". (Defined in panel-based or world-based systems, the two are interchangeable), ideally... However, a small deviation exists in reality; to quantitatively characterize this deviation, let the in-plane deviation vector under the small-angle approximation be δ=δ u u p +δ v v p Where δ is the in-plane slight inclination of the alignment rod relative to the normal of the panel (radian measure; when the small angle approximation holds, ‖δ‖<<1), δ u ,δv They are along u p ,v p The small tilt component of the direction. For a more precise approximation than a first-order approximation, a unit vector can be used directly. This represents the actual rod axis; there is no need to explicitly use δ.

[0217] The camera-based visual angle measurement method can complete the 3D solution in a single observation. Specifically, it involves identifying the pixel at the "top" of the alignment pole in the S5's anchored image. (Stable extraction can be achieved by establishing a fan-shaped ROI near the base of the pole and selecting the "farthest connected point extending outward from O" using thinning / line segment fitting). The camera intrinsic parameter matrix K is then used to transform it into a normalized line-of-sight direction in the camera coordinate system. Let R be the extrinsic parameter from the panel system to the camera system. pc (Rotate the panel system vector to the camera system) and t pc (If the origin of the control panel is located in the camera system, then the coordinates of the camera center in the control panel system are:) Where C p Let d be the three-dimensional position vector of the camera's optical center in the panel system. p Let X be the unit direction vector in the panel system corresponding to the spatial direction of the pixel pointing from the camera to the top of the alignment rod. The geometric length of the alignment rod is known to be h (the effective length along the rod axis, which can be obtained from factory calibration or field measurement), and the true 3D position X of the top of the rod is given. tip The following two constraints must be satisfied: "the aforementioned ray is located at the center of the camera" and "the distance to the base point O of the rod is h". Therefore, the coordinates of the rod top can be solved by the intersection of the ray and the sphere: Let...

[0218] X tip (λ)=C p +λd p ,‖X tip (λ)-O‖ 2 =h 2 ;

[0219] Solving

[0220]

[0221] In the formula, λ is the ray parameter (unit: meter or millimeter, depending on the coordinate scale), and "·" represents the dot product; the value that X should be chosen is... tip The solution located "above" the panel (i.e., n·X) tip The one greater than 0 must be selected, and the discriminant must be non-negative; otherwise, it indicates an error in pixel extraction or extrinsic parameters. Then, the following can be obtained:

[0222]

[0223] in For the true alignment rod axis unit vector (panel system expression), ideally... For a slightly inclined first-order approximation in the plane, it can be further derived from... δ u ,δ v (The first-order approximation is sufficiently accurate when the deviation is less than approximately 3°), where It is the cosine of the real rod axis and the normal.

[0224] The implementation path based on the "ring-shaped bubble level" at the base of the pole is more economical and suitable for scenarios where visual recognition of the pole top is inconvenient. The ring-shaped bubble level can be approximated as a "displacement-tilt linear" device within a small angle range. Its calibration sensitivity is denoted as κ (unit: mm / deg or mm / rad, obtained from factory calibration or one-time field calibration). Under the panel system, the two mutually orthogonal scale axes of the level are aligned with u... p ,v p Align the bubble, take a picture, or use your phone to read the displacement (Δx) of the bubble relative to the center. b ,Δy b (Unit: mm, along u) p ,v p If the positive and negative directions correspond, then the in-plane dip component under the small angle approximation can be taken as...

[0225]

[0226] Where δ u ,δ v The unit is degrees or radians, and must be consistent with the unit of κ. If the vertical component of g in the panel system is obtained directly from the accelerometer reading of a mobile phone, the equivalent relationship of "ideal direction of the rod axis n" can be replaced with "ideal direction of the rod axis g" for calibration. However, to maintain consistency with the geometry of S4, it is recommended to still express δ in the panel system. The consistent unit vector of the true rod axis given by δ can be approximated by first-order normalization.

[0227]

[0228] The second approximation on the right is used for fast calculations at very small angles; in the implementation, only one normalization is needed.

[0229] The measured Introducing shadow geometry to achieve compensation is a key interface point between S0 and S4. Let the length of the alignment rod be h, and the coordinates of the rod vertex be... The shadow endpoint is obtained by projecting the shadow vector from the top of the pole onto the panel plane in the opposite direction of the sun's direction (i.e., along -s). (From the base of the pole to the shaded endpoint, defined within the plane of the panel) can be given by the formula for the intersection of a line and a plane.

[0230]

[0231] In the formula, the denominator n·s=cosθ i To be the cosine of the incident angle, the condition n·s > 0 must be satisfied; this formula automatically guarantees this. Falling on the panel plane (verifiable) ).from This will give you the compensated "target shadow direction and length".

[0232]

[0233] in The compensated target direction unit vector (can be represented in two-dimensional or three-dimensional plane on the panel), The target shadow length after compensation; when It degenerates into the commonly used one. With L T =htanθ i , where s || = s - (s·n)n. If the system link prefers "in-plane first-order compensation", it can also be written under the small-angle approximation as

[0234]

[0235] in This indicates that the first order of the denominator is ignored (which is often sufficient). In implementation, the strategy of "full form first, first form as backup" is more robust.

[0236] To ensure robustness of measurement and compensation, reasonable quality thresholds and consistency checks need to be set in S0. In the visual angle measurement path, firstly, the homography anchoring quality of S5 must meet the standards (reprojection mean error does not exceed the preset pixel threshold, and the number of corner points is sufficient); secondly, the "ray / sphere" discriminant must be non-negative and the interval between two frames must be consistent. The changes were not drastic; Perform exponential smoothing for 5-10 frames. In each step, normalization is performed to suppress high-frequency noise (λ is typically 0.4–0.6). In the bubble method path, the sensitivity κ should be calibrated once (this can be done by creating a known tilt angle on a flat surface using a small shim of known height, or by cross-calibrating using the tilt angle of a mobile phone), and ensuring that the bubble reading axis is aligned with u. p ,v p Alignment; when the reading amplitude exceeds the set upper limit (e.g., ‖δ‖>2°), a mechanical reset (re-insertion or deployment to the stop) should be prompted instead of relying solely on software compensation. Regardless of the path used, once the compensation value is determined, it should be written to the current session's "attitude context" and calculated in S4. Effective immediately; if detected during subsequent S6 / S7 processes. If a sudden change occurs (e.g., the attitude of the locking lever is changed by a touch), the system should automatically trigger S0 retest and refresh the compensation.

[0237] In summary, S0 provides the true alignment rod axis through two complementary paths: "visual angle measurement" and "bubble angle measurement". The compensated target shadow direction and length parameters are generated using a precise "pole top projection - plane intersection" geometric formula. This compensation only needs to be injected once before S4 in the entire link, which can "eliminate" the small system errors caused by assembly and wear in advance, and significantly improve the alignment convergence speed and final attitude accuracy of the subsequent S5 to S8.

[0238] IV. Implementation Guidelines and Engineering Recommendations

[0239] In terms of machining and assembly, the consistency between the axis of the socket and the normal of the panel determines the initial geometric accuracy. It is recommended to use a combination structure of conical guide and keyed limit, and to add a thin-walled bushing at the hole opening to reduce axial wobble caused by long-term wear. For folding hinges, it is recommended to use a stop pin and double-sided magnetic attraction. When unfolded into place, the stop pin provides angular positioning, and the magnetic attraction provides vibration-resistant holding force, which can balance convenient storage and unfolding rigidity. The calibration of the angle scale should be consistent with the zero position of the bracket. On-site, a relative calibration can be performed using a mobile phone IMU, that is, the panel is placed on a reference plane with a known horizontal or known angle, and the scale and reading errors are checked and the compensation value is recorded in the software. Once the geometric parameters of camera distortion and planar markings are calibrated, they can be reused for a long time. However, if the mobile phone or panel is replaced, it is recommended to recalibrate at more than three points to ensure the stability of H and the anchoring accuracy. Shadow detection is prone to glare and highlight overflow on highly reflective surfaces. It is recommended to use matte markings and lay a narrow, low-reflection strip along the edge of the panel as a "detection guide strip." In the ROI, prioritize searching along the shadow axis along the guide strip, which helps improve robustness in high-light environments. For areas with high altitudes, harder spectra, or frequent sandstorms, the rod diameter and end face chamfer radius can be appropriately increased to ensure the sharpness of the shadow edge and improve durability. For extremely cold regions, the materials for the folding mechanism and sockets should take into account low-temperature brittleness and freeze-thaw effects, and engineering plastics or anodized aluminum with good UV resistance and low-temperature impact performance should be selected.

[0240] At the software and interaction level, it is recommended to provide a "geometric lock indicator" and a "recognition confidence bar" in AR overlay. When the reprojection error of pose estimation exceeds a threshold (e.g., >0.8px), the error calculation should be paused and a clear color warning should be displayed. To accommodate different user habits, a "simple mode (only directional arrows + progress circle)" and a "professional mode (displaying angle values, error vectors, light intensity, and shutter parameters)" can be provided, thus achieving a balance between ease of use and interpretability. The installation history should be locally archived (date, location, target pose, final error, photo snapshots) for easy after-sales service and quick reset during subsequent maintenance.

[0241] In terms of performance metrics, based on the pose constraints of common mobile phone cameras (equivalent focal length 24-28mm) and more than three markers, the AR anchoring error of the target shadow can be controlled at the sub-pixel to 1 pixel level; combined with shadow principal axis detection and H -1 The accuracy of azimuth measurement is better than ±0.5°, and the relative error of length is better than ±3-5% (depending on pole length and shooting distance). Using a unidirectional approximation strategy, the final state repeatability of pitch and azimuth can be controlled within ±1°, sufficient to meet the long-term power generation requirements of "fixed / low-frequency adjustment". Compared to the simple empirical values ​​of the "latitude rule", the (β*, γ*) obtained through energy optimization can achieve a 2-5% (depending on the shading pattern and energy consumption curve) annual power generation gain in most urban environments. If the target season is clearly defined (e.g., power supply guarantee during winter), seasonal bias can also bring higher available power during the target period.

[0242] V. Industrial Applicability and Variations

[0243] The method and system for "target attitude, target shadow, AR anchoring, and closed-loop guidance" described in this invention consist of hardware made of common components, which is low-cost and easy to assemble. It can be used as standard equipment for new factory components or as a retrofit kit for existing panels. The software runs on general mobile terminals, requiring no proprietary hardware and facilitating maintenance. For fixed-tilt arrays at field stations, this method can also be used during maintenance to quickly verify sampled arrays. For portable folding panels, the "one-time completion" advantage of this method is particularly significant during non-midday hours. It should be noted that, without departing from the spirit and scope of this invention, modifications such as replacing planar pose estimation with LiDAR / ToF point cloud planar fitting; replacing shadow detection with a lightweight deep network instead of traditional image operators; extending "one-way approximation" to an adaptive step-size strategy with hysteresis loops; and replacing target shadow shapes with "fan-shaped difference bands" to enhance readability are all conventional modifications by those skilled in the art and can be considered equivalent substitutions.

[0244] The above implementation method, from the overall structure and component composition to the implementation steps of S1-S8 and the verticality compensation of S0, provides a directly implementable engineering path, and provides clear mathematical definitions and parameter descriptions for key links. Those skilled in the art can use this to complete the hardware and software integration, and make adaptive adjustments to parameters such as pole length, marker size, error weight, and convergence threshold according to different scenarios, thereby achieving the technical effect of this invention: "calibrating to the target fixed posture in one go at any time."

Claims

1. A method for calibrating and installing a solar panel, applicable to solar panels equipped with alignment rods perpendicular to the surface of the solar panel, characterized in that, Follow these steps: S1: The mobile terminal obtains the user's authorized geographic location and date / time information; S2: Calculate the solar position parameters based on the given location and time to obtain the solar altitude angle and azimuth angle; S3: Determine the target installation posture of the solar panel according to the preset installation strategy. The target installation posture includes the target pitch angle and the target azimuth angle. The preset installation strategy includes at least "year-round optimized posture" and / or "seasonal optimized posture". S4: In the solar panel plane coordinate system, based on the target installation posture and the sun position parameters, calculate the target shadow trajectory parameters on the panel plane when the alignment rod is aligned with the panel normal. The parameters include at least one or both of the target shadow direction vector and the target shadow length. S5: Under the constraint of the planar reference mark arranged on the surface of the solar panel, the pose estimation and homography transformation of the panel plane are performed by the mobile terminal camera, and the target shadow trajectory parameters are anchored and displayed on the actual panel plane area in the form of graphics or augmented reality overlay. S6: The user first adjusts the panel pitch angle to the target pitch angle according to the pitch angle scale on the solar panel bracket, and then adjusts the orientation around the vertical axis; S7: The mobile terminal detects the alignment rod and its actual shadow vector on the panel plane through image processing, and calculates the vector error between the alignment rod and the target shadow trajectory parameters; S8: Generate a unidirectional approximation adjustment command based on the vector error to suppress the influence of the support mechanism's return stroke on the final attitude, until the vector error meets the preset tolerance and convergence criterion, at which point the calibration is determined to be complete.

2. The method as described in claim 1, characterized in that, It also includes step S0 for calibrating and compensating the verticality of the alignment rod: based on the visual angle measurement of the annular bubble level and / or the mobile terminal camera set at the base of the rod, the angular deviation between the alignment rod axis and the solar panel normal is determined, and the deviation is introduced into the calculation of the target shadow trajectory parameters for geometric compensation to generate the compensated target shadow direction and / or length.

3. The method as described in claim 1, characterized in that, In step S1: latitude and longitude are automatically read via GNSS first, and IANA time zone and daylight saving time (DST) offset are resolved; a lightweight NTP time synchronization is performed under network conditions to suppress system clock drift, and the user is prompted to check the time in offline scenarios; manual input rollback of city / coordinates and date and time is supported; the above location and time are only used locally for angle calculation, and the cache is automatically cleared when the session ends. In step S2: the solar position algorithm SPA or its equivalent implementation is used to calculate the solar declination and mean time difference, and based on this, the local true solar time and hour angle are obtained; the solar altitude angle is calculated according to... ; The obtained azimuth angle is determined by quadrant determination using atan2 and then unified to a clockwise interval with true north as 0°; atmospheric refraction correction is applied to the elevation angle when meteorological / altitude information is available.

4. The method as described in claim 1, characterized in that, In step S3: Obtain the target elevation angle βT and target azimuth angle γ according to the preset installation strategy. T The strategy includes at least "year-round attitude optimization" and / or "seasonal attitude optimization": empirical methods are used when data is insufficient; when irradiation and temperature data are available, a periodic energy objective function is constructed using irradiation transpose and temperature correction, and the maximum solution is searched within constraints as (β). T ,γ T ); In step S4: according to the (β) T ,γ T Using the solar position parameters, the projection of the solar direction onto the panel plane is obtained, and the direction unit vector and / or length of the target shadow are obtained, where the length is calculated based on the incident angle. When there is a verticality deviation of the alignment rod, the target shadow parameters are generated using a compensation model that includes the actual axial amount of the rod. In step S6: First, adjust the pitch angle to β according to the pitch scale on the support. T Then, the azimuth angle is approached in small steps around the vertical axis in a fixed direction to make the direction of the alignment rod shadow consistent with the target shadow. If necessary, the pitch is finely adjusted using the lead screw fine-tuning mechanism, and the pitch scale can be cross-checked by the IMU reading of the mobile terminal.

5. The method as described in claim 1, characterized in that, In step S5: Planar reference markers are placed on the panel surface. After the mobile terminal performs distortion correction on the camera image, it uses the marker corner points to solve the homography matrix to complete the panel plane pose estimation. The target shadow trajectory is then superimposed onto the actual panel area in a graphical or augmented reality manner. When the reprojection error or corner point visibility is below the threshold, the superimposition is paused and a prompt to re-frame the image is displayed.

6. The method as described in claim 1, characterized in that, In step S7: The camera image is shaped to the panel plane metric domain by inverse homography transformation. Based on the edge-line method and the region-skeleton method, the redundancy detection is used to extract the principal axis direction and length of the alignment rod shadow, forming the actual shadow vector in the panel plane. The directional angle error, length residual and weighted comprehensive error between the shadow and the target shadow trajectory parameters are calculated for subsequent adjustment and convergence determination.

7. The method as described in claim 1, characterized in that, In step S8: the step size of azimuth and pitch adopts a proportional, saturation, and guardrail anti-crossing strategy, and the rotation / pitch direction is fixed to avoid backtracking; the convergence criterion is that the comprehensive error does not increase monotonically within the preset dwell time window and the final value is lower than the direction and length tolerance thresholds respectively; when there is insufficient light, backlight, or the anchoring quality is not up to standard, the degradation mode is entered or the pause command is given until the conditions are met.

8. A solar panel alignment system for implementing the method according to any one of claims 1-8, characterized in that, include: (1) A solar panel bracket with an adjustable pitch structure and pitch angle scale; (2) An alignment rod set at right angle to the surface of the solar panel, wherein the alignment rod is a foldable or pluggable structure, and the insertion hole axis of the pluggable structure is in the same direction as the normal of the panel and is provided with a limiting cone surface or key structure to ensure perpendicularity. (3) Planar reference marks arranged on the surface of the solar panel are used for pose estimation and homography transformation of the mobile terminal; (4) An application installed on a mobile terminal is configured to perform the steps described in S1–S8 of claim 1 and to display the target shadow trajectory parameters in an augmented reality manner on the actual panel plane; (5) The system can also calibrate the installation posture of the target by matching the target shadow trajectory at any time other than noon.

9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method described in any one of claims 1-7.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Piezoelectric drive based automatic tracking solar collecting device

    CN111578540A

  • Solar panel alignment device

    US10511254B1