Light angle detection method and device, storage medium and computer equipment

Through the calculation of the spatial rectangular coordinate system and current value ratio of the optical angle sensor of the positive triangular stage structure, the problem of low accuracy of light angle detection is solved, and efficient and accurate light angle measurement is achieved, which is suitable for scenes such as solar panel tracking.

CN119063656APending Publication Date: 2024-12-03SHENYANG ZHONGGUANG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410987469.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, the light angle detection method has low accuracy and cannot accurately grasp the sunlight irradiation angle, resulting in low efficiency of solar panels on sunlight utilization.

Method used

Using an optical angle sensor with a positive triangular stage structure, the current value ratio calculation of the spatial rectangular coordinate system and the light receiving element is determined to accurately measure the incident angle of the light.

Benefits of technology

Improves the accuracy and efficiency of light angle measurement, can respond quickly to light angle changes, is suitable for dynamic environments, simplifies sensor design and data processing, and enhances robustness and integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119063656A_ABST
    Figure CN119063656A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of space angle detection, and discloses a light angle detection method, which is applied to an optical angle sensor with a regular prism frustum structure, and comprises the following steps: constructing a space rectangular coordinate system based on three side edges of the optical angle sensor, and establishing an expression of a top surface; the ratio of current values output by two adjacent light receiving elements is calculated, a linear expression of the incident light is established, then the elevation angle between the incident light and the top surface is calculated according to the linear expression of the incident light and the expression of the top surface, and the bottom surface is further used as a horizontal plane; determining a reference bottom edge, defining a coordinate axis perpendicular to the reference bottom edge as a reference axis, calculating an included angle between the incident light and a projection straight line of the reference axis on the top surface as a positioning angle of the incident light, and finally determining the incident angle of the incident light according to the elevation angle and the positioning angle. According to the method, the accurate mathematical model, the real-time response capability and the high integration are combined, and the accuracy and efficiency of angle measurement are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of space angle detection technology, and in particular to a light angle detection method, device, storage medium and computer equipment. Background Art

[0002] With the improvement of people's scientific and technological level, the country vigorously promotes clean energy. In addition to traditional hydropower generation, thermal power generation and wind power generation, photovoltaic power generation mode is gradually becoming popular. However, in the traditional photovoltaic power generation mode, the position of the solar panel is relatively fixed, so it can only obtain sunlight at a fixed angle, and the efficiency of sunlight utilization is not high.

[0003] In the prior art, in order to improve the utilization rate of sunlight by solar panels, motors can be installed on solar panels to make the solar panels rotate as the angle of sunlight changes. Currently, solar panels are usually controlled to rotate according to the law of sunlight irradiation or manually controlled to rotate. However, the above two control methods are too rigid and cannot accurately grasp the changes in the angle of sunlight. The accuracy of light angle detection needs to be improved. Summary of the invention

[0004] In view of this, the present application provides a light angle detection method, device, storage medium and computer equipment, the main purpose of which is to solve the technical problem that the light angle detection method in the prior art has low accuracy and cannot accurately grasp the angle of sunlight.

[0005] According to a first aspect of the present invention, a light angle detection method is provided, which is applied to an optical angle sensor, wherein the optical angle sensor is a regular triangular prism structure, and the optical angle sensor comprises a top surface, a bottom surface and three side surfaces, each of which is provided with a light receiving element, and the light receiving element is used to receive incident light and output a current value; the method comprises:

[0006] Constructing a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establishing an expression of the top surface in the spatial rectangular coordinate system;

[0007] Calculating the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, establishing a straight-line expression of the incident light based on the current value ratio, and calculating the elevation angle between the incident light and the top surface according to the straight-line expression of the incident light and the expression of the top surface;

[0008] Taking the bottom surface as a horizontal plane, determining a reference bottom edge in the bottom surface that coincides with a preset horizontal line, defining a coordinate axis perpendicular to the reference bottom edge on the horizontal plane as a reference axis, and calculating an angle between a projection line of the incident light on the top surface and a projection line of the reference axis on the top surface as a positioning angle of the incident light;

[0009] The incident angle of the incident light in the spatial rectangular coordinate system is determined according to the elevation angle and the positioning angle.

[0010] Optionally, constructing a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establishing an expression of the top surface in the spatial rectangular coordinate system, includes:

[0011] The intersection point of the three side edges of the optical angle sensor is defined as the coordinate origin;

[0012] Constructing a spatial rectangular coordinate system based on the coordinate origin and the three side edges, wherein the three side edges are respectively the X axis, the Y axis and the Z axis of the spatial rectangular coordinate system;

[0013] In the spatial rectangular coordinate system, the intersection points between the top surface and the X-axis, the Y-axis and the Z-axis are obtained respectively, and an expression of the top surface is established according to the intersection points between the top surface and the three coordinate axes.

[0014] Optionally, before calculating the ratio of the current values ​​output by two adjacent light receiving elements according to the current value output by each light receiving element, the method further includes:

[0015] In the spatial rectangular coordinate system, determine an incident light ray directed toward the coordinate origin, and select a target point on the incident light ray to obtain a coordinate expression of the target point, wherein the coordinate expression of the target point includes a horizontal coordinate, a vertical coordinate, and a vertical coordinate of the target point;

[0016] The target point is set to be located on the surface of a sphere whose diameter is a preset value, and a coordinate relationship expression of the target point is established according to the coordinate expression of the target point.

[0017] Optionally, the calculating the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element comprises:

[0018] Obtaining an incident angle between the incident light and each side surface;

[0019] Select any one of the three side surfaces as a reference surface, define two side edges located on the reference surface as a first reference axis and a second reference axis respectively, and define a side surface including the first reference axis as a first calculation surface, and define a side surface including the second reference axis as a second calculation surface, except for the reference surface;

[0020] Determine a projection line of the incident light on the reference plane, and obtain a first angle between the projection line and the first reference axis, and a second angle between the projection line and the second reference axis, wherein the first angle and the second angle are complementary to each other;

[0021] Based on the preset intensity of the incident light, using Lambert's cosine law, according to the incident angle between the incident light and the reference surface, the incident angle between the incident light and the first calculation surface, and the first angle, calculate the light intensity received by the first calculation surface, and according to the incident angle between the incident light and the reference surface and the second angle, calculate the light intensity received by the second calculation surface;

[0022] Determine the current value output by the light receiving element on each calculation surface according to the light intensity received by each calculation surface, and calculate the ratio of the current values ​​between two adjacent calculation surfaces;

[0023] Then, the other two side surfaces are selected as reference surfaces in turn, and the ratio of the current values ​​output by any two adjacent light-receiving elements is calculated.

[0024] Optionally, establishing a straight line expression of the incident light based on the ratio of the current values ​​includes:

[0025] Obtaining a ratio of the current values ​​output by two adjacent light-receiving elements in the three side surfaces, wherein the ratio of the current values ​​includes a ratio of the ordinate to the abscissa of the target point, a ratio of the ordinate to the abscissa of the target point, and a ratio of the ordinate to the ordinate of the target point;

[0026] Substituting the ratio of the current values ​​into the coordinate relationship expression of the target point to calculate the coordinate value of the target point;

[0027] A straight line expression of the incident light is established according to the coordinate value of the target point and the coordinate origin.

[0028] Optionally, the calculating the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface comprises:

[0029] Calculating the coordinate value of the top surface intersection point between the incident light and the top surface according to the straight line expression of the incident light and the top surface expression;

[0030] Calculating the distance between the target point and the top surface intersection point according to the coordinate value of the top surface intersection point and the coordinate value of the target point;

[0031] Draw a perpendicular line from the target point to the top surface, and calculate the distance of the perpendicular line according to the coordinate value of the target point and the expression of the top surface;

[0032] The elevation angle between the incident light and the top surface is calculated according to the distance of the vertical line and the distance between the target point and the intersection point of the top surface.

[0033] Optionally, the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface is calculated as the positioning angle of the incident light;

[0034] Establishing a straight line expression of the perpendicular line based on the coordinate value of the target point;

[0035] The coordinate value of the perpendicular line intersecting the perpendicular line on the top surface is calculated according to the straight line expression of the perpendicular line and the expression of the top surface;

[0036] According to the coordinate value of the foot of the perpendicular and the coordinate value of the intersection point of the top surface, a straight line expression of the projection line of the incident light on the top surface is established, and a corresponding first vector is obtained;

[0037] Obtaining the coordinate value of the reference intersection point between the top surface and the reference axis, and the coordinate value of the projection point of the coordinate origin on the top surface, establishing a straight line expression of the projection line of the reference axis on the top surface according to the coordinate value of the reference intersection point and the coordinate value of the projection point, and obtaining the corresponding second vector;

[0038] The positioning angle of the incident light is calculated according to the first vector and the second vector.

[0039] According to a second aspect of the present invention, there is provided a light angle detection device, which is applied to an optical angle sensor. The optical angle sensor is a regular triangular prism structure. The optical angle sensor comprises a top surface, a bottom surface and three side surfaces. Each side surface is provided with a light receiving element. The light receiving element is used to receive incident light and output a current value. The device comprises:

[0040] A coordinate system establishment module, used to construct a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establish an expression of the top surface in the spatial rectangular coordinate system;

[0041] an elevation angle calculation module, used to calculate the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, establish a straight line expression of the incident light based on the current value ratio, and calculate the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface;

[0042] a positioning angle calculation module, for taking the bottom surface as a horizontal plane, determining a reference bottom edge in the bottom surface that coincides with a preset horizontal line, defining a coordinate axis perpendicular to the reference bottom edge on the horizontal plane as a reference axis, and calculating an angle between a projection line of the incident light on the top surface and a projection line of the reference axis on the top surface as the positioning angle of the incident light;

[0043] The incident angle determination module is used to determine the incident angle of the incident light in the spatial rectangular coordinate system according to the elevation angle and the positioning angle.

[0044] According to a third aspect of the present invention, there is provided a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned light angle detection method is implemented.

[0045] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above-mentioned light angle detection method is implemented when the processor executes the program.

[0046] The present invention provides a light angle detection method, device, storage medium and computer equipment. First, a spatial rectangular coordinate system is constructed based on the three side edges of an optical angle sensor, and an expression of a top surface is established in the spatial rectangular coordinate system. Then, the ratio of the current values ​​output by two adjacent light receiving elements is calculated according to the current value output by each light receiving element. A straight line expression of the incident light is established based on the current value ratio. The elevation angle between the incident light and the top surface is calculated according to the straight line expression of the incident light and the expression of the top surface. Then, the bottom surface is taken as a horizontal plane, and a reference bottom edge in the bottom surface that coincides with a preset horizontal line is determined. The coordinate axis perpendicular to the reference bottom edge in the horizontal plane is defined as a reference axis. The angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface is calculated as the positioning angle of the incident light. Finally, the incident angle of the incident light in the spatial rectangular coordinate system is determined according to the elevation angle and the positioning angle. The above method provides a clear mathematical model for angle measurement by constructing a spatial rectangular coordinate system and determining the top surface expression, and calculates the current ratio based on the current value output by the light-receiving element, and then establishes a linear expression of the incident light, and finally calculates the elevation angle of the incident light relative to the top surface and the positioning angle of the incident light relative to the reference axis, ensuring the high accuracy of the angle measurement; the method combines real-time monitoring and rapid calculation of the current value, can quickly respond to changes in the angle of the incident light, and has a wide range of applications; based on a standardized spatial rectangular coordinate system and mathematical model, the sensor design and data processing process are simplified, and it is easy to integrate with existing systems; the method cross-validates the output of multiple light-receiving elements to improve the robustness of angle measurement; and finally directly calculates the incident angle in the spatial rectangular coordinate system, avoiding the error accumulation that may be introduced in multiple conversions and calculation steps, and improving the accuracy of measurement. The above method combines accurate mathematical models, real-time response capabilities and high integration, effectively improving the accuracy and efficiency of angle measurement.

[0047] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0049] Figure 1 A schematic diagram of the structure of an optical angle sensor used in a light angle detection method provided by an embodiment of the present invention is shown;

[0050] Figure 2A schematic diagram of a process of a light angle detection method provided by an embodiment of the present invention is shown;

[0051] Figure 3 A schematic diagram showing a flow chart of another light angle detection method provided by an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of a spatial rectangular coordinate system established based on an optical angle sensor in another light angle detection method provided by an embodiment of the present invention is shown;

[0053] Figure 5 A schematic diagram showing an incident light ray directed toward an XY reference plane in another light angle detection method provided by an embodiment of the present invention;

[0054] Figure 6 A schematic diagram of the projection of an incident light beam onto an XY reference plane in another light angle detection method provided by an embodiment of the present invention is shown;

[0055] Figure 7 A schematic diagram showing the elevation angle position of an incident light beam in another light angle detection method provided by an embodiment of the present invention;

[0056] Figure 8 A schematic diagram showing the position angle of an incident light beam in another light angle detection method provided by an embodiment of the present invention is shown;

[0057] Fig. 9 A schematic structural diagram of a light angle detection device provided by an embodiment of the present invention is shown;

[0058] Fig.10 A schematic diagram of the device structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0059] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0060] The embodiment of the present application provides a light angle detection method, which is applied to an optical angle sensor. The optical angle sensor is a regular triangular prism structure. The optical angle sensor includes a top surface, a bottom surface and three side surfaces. A light receiving element is disposed on each side surface. The light receiving element is used to receive incident light and output a current value.

[0061] First, the application environment of the light angle detection method provided by the present application is described, that is, the method is applied to an optical angle sensor with a regular triangular pyramid structure. The specific structure of the optical angle sensor is as follows: Figure 1 As shown, a light receiving element is arranged on each side of the optical angle sensor to receive light and output a current value. Compared with the traditional planar structure sensor, which can only qualitatively determine the source direction of light, the optical angle sensor with a regular triangular prism structure has a larger range of light receiving angles, can comprehensively collect light and perform calculations, and accurately perform quantitative analysis on the light according to the output results of the optical angle sensor, and accurately obtain the incident angle and incident intensity of the light.

[0062] Specifically, Figure 2 As shown, the method comprises the following steps:

[0063] 101. Construct a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establish an expression for the top surface in the spatial rectangular coordinate system.

[0064] Specifically, the regular triangular prism structure can be understood as cutting off a small triangular pyramid from the regular triangular pyramid structure, and the remaining structure is a regular triangular prism, which includes a top surface and three side surfaces, and every two side surfaces intersect at a side edge, and the three side edges intersect at one point after extension. This point is exactly the vertex of the original regular triangular pyramid. This is used as the coordinate origin of the spatial rectangular coordinate system. The three side edges are perpendicular to each other based on the intersection point, and serve as the three coordinate axes of the spatial rectangular coordinate system. In this way, the optical angle sensor is completely set in the spatial rectangular coordinate system. Based on the spatial rectangular coordinate system, each point in the optical angle sensor and subsequent incident light can be expressed and calculated using formulas, and finally the incident angle of the incident light is accurately calculated to achieve quantitative analysis of the incident light.

[0065] In this embodiment, the top surface of the regular triangular prism structure is an equilateral triangle, and each point of the equilateral triangle is located on the side edge. Therefore, the three-point coordinates of the top surface can be clearly determined, and then the expression of the top surface can be established in the spatial rectangular coordinate system. After constructing the spatial rectangular coordinate system and determining the top surface expression, a foundation is laid for the subsequent determination of the specific position coordinates of the intersection between the incident light ray and the top surface and the establishment and calculation of the expression of the incident light ray in the spatial rectangular coordinate system. The process of constructing the spatial rectangular coordinate system is also a process of mathematical modeling, which simplifies the complexity of calculating the direction of the incident light ray, makes subsequent calculations more intuitive and direct, and improves the accuracy of angle measurement.

[0066] 102. Calculate the ratio of the current values ​​output by two adjacent light receiving elements according to the current value output by each light receiving element, establish a straight line expression for the incident light based on the current value ratio, and calculate the elevation angle between the incident light and the top surface according to the straight line expression for the incident light and the expression for the top surface.

[0067] Specifically, the light receiving elements on the three sides of the optical angle sensor receive different degrees of light and output current values ​​of different values. Since the structure of the optical angle sensor is a regular triangular prism structure in the existing three-dimensional structure, the ratio of the current values ​​output by two adjacent light receiving elements not only reflects the ratio of the received light intensity between the adjacent sides, but also can determine other information according to the structural position between the regular triangular prisms. For example, the expression of the incident light in the spatial rectangular coordinate system can be determined. After determining the expression of the incident light, a series of other subsequent calculations can be performed to determine the specific angle of the incident light. After specifically combining the expression of the incident light and the expression of the top surface, the angle of the incident light to the top surface can be calculated, that is, the elevation angle of the incident light to the optical angle sensor, which is used as a basis for judging the specific angle of the incident light.

[0068] In this embodiment, all calculation steps are performed in an established spatial rectangular coordinate system. By obtaining the ratio of the current values ​​of two adjacent light-receiving elements to establish a linear expression for the incident light, the direction of the light can be determined more accurately, thereby improving the accuracy of elevation angle measurement. Moreover, the entire measurement process is based on optical principles and does not require direct physical contact with the object being measured, which is very beneficial in some environments such as high temperature, high pressure or dangerous environments. At the same time, the calculation process can be completed simply and efficiently, so that the optical angle sensor can monitor and respond to changes in the angle of the incident light in real time, which is suitable for angle measurement in dynamic environments, reducing the complexity and cost of the overall structure of the optical angle sensor.

[0069] 103. Take the bottom surface as a horizontal plane, determine the reference bottom edge in the bottom surface that coincides with the preset horizontal line, define the coordinate axis perpendicular to the reference bottom edge in the horizontal plane as the reference axis, calculate the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface, and use it as the positioning angle of the incident light.

[0070] Specifically, the top surface of the regular triangular prism optical angle sensor is facing upward when in use, and the three side surfaces serve as photosensitive surfaces to receive the incident light. The optical angle sensor is not placed in disorder when in use and installed. It is necessary to assume that the bottom surface is a horizontal plane to determine the installation reference of the optical angle sensor, and then determine the preset horizontal line in the horizontal plane. The preset horizontal line is the reference line. When installing the sensor, it is necessary to keep the bottom edge of one side coincident with the preset horizontal line. This bottom edge serves as the reference bottom edge. At this time, there must be a coordinate axis that is perpendicular to the reference bottom edge in the horizontal plane. This coordinate axis serves as the reference axis. Completing the setting of the above horizontal reference is crucial to the accuracy of subsequent angle measurement. Then, the incident light and the projection line of the reference axis are obtained on the top surface, and the angle between the two projection lines is determined as the positioning angle of the incident light.

[0071] In this embodiment, defining the reference axis in the spatial rectangular coordinate system can provide a clear reference system, so that the direction of the incident light can be accurately quantified, which is convenient for subsequent data processing and angle measurement. By treating the bottom surface as a horizontal plane and determining the reference bottom edge and the reference axis, the measurement error caused by inaccurate or tilted sensor installation can be eliminated, thereby improving the accuracy of angle measurement. Once the reference axis is defined, the process of calculating the positioning angle of the incident light becomes standardized, which simplifies the calculation steps and reduces the calculation complexity. In addition, angle measurement is performed based on a fixed reference axis, which reduces the influence of external environmental factors on the measurement results and improves the reliability of the measurement results.

[0072] 104. Determine the incident angle of the incident light in the spatial rectangular coordinate system based on the elevation angle and the positioning angle.

[0073] Specifically, the elevation angle refers to the angle between the incident light and the top surface, representing the deflection of the light in the vertical direction, while the positioning angle is the angle between the projection of the incident light on the horizontal plane and a fixed reference direction. In this application, the fixed reference direction is the reference axis, which specifically indicates the direction of the light on the horizontal plane. In a certain spatial rectangular coordinate system, the elevation angle and positioning angle of the incident light are calculated, that is, the deflection angles of the light in the horizontal and vertical directions are mastered, and the direction of the incident light in the spatial rectangular coordinate system can be accurately determined.

[0074] In this embodiment, the direction of the incident light in three-dimensional space can be accurately determined through the combination of the elevation angle and the positioning angle, and can be applied to scenarios that require accurate knowledge of the position or angle of the light source, such as solar panel tracking, astronomical observation, radar systems, etc.; and, the angle information is converted into a vector in a spatial rectangular coordinate system, making subsequent data processing and analysis more intuitive and convenient. After calculating the elevation angle and the positioning angle, the incident angle of the incident light can be determined, which helps to quickly respond to changes in the direction of the light and to adjust the direction of devices such as solar panels in a timely manner.

[0075] A light angle detection method provided by the present invention is applied to an optical angle sensor of a regular triangular prism structure. The method includes first constructing a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establishing an expression for the top surface in the spatial rectangular coordinate system, then calculating the ratio of the current values ​​output by two adjacent light receiving elements according to the current value output by each light receiving element, establishing a linear expression for the incident light based on the current value ratio, and calculating the elevation angle between the incident light and the top surface according to the linear expression for the incident light and the expression for the top surface, then taking the bottom surface as a horizontal plane, determining a reference bottom edge in the bottom surface that coincides with a preset horizontal line, defining a coordinate axis perpendicular to the reference bottom edge on the horizontal plane as a reference axis, calculating the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface as the positioning angle of the incident light, and finally determining the incident angle of the incident light in the spatial rectangular coordinate system according to the elevation angle and the positioning angle. The above method provides a clear mathematical model for angle measurement by constructing a spatial rectangular coordinate system and determining the top surface expression, and calculates the current ratio based on the current value output by the light-receiving element, and then establishes a linear expression of the incident light, and finally calculates the elevation angle of the incident light relative to the top surface and the positioning angle of the incident light relative to the reference axis, ensuring the high accuracy of the angle measurement; the method combines real-time monitoring and rapid calculation of the current value, can quickly respond to changes in the angle of the incident light, and has a wide range of applications; based on a standardized spatial rectangular coordinate system and mathematical model, the sensor design and data processing process are simplified, and it is easy to integrate with existing systems; the method cross-validates the output of multiple light-receiving elements to improve the robustness of angle measurement; and finally directly calculates the incident angle in the spatial rectangular coordinate system, avoiding the error accumulation that may be introduced in multiple conversions and calculation steps, and improving the accuracy of measurement. The above method combines accurate mathematical models, real-time response capabilities and high integration, effectively improving the accuracy and efficiency of angle measurement.

[0076] The present application embodiment provides another light angle detection method, such as Figure 3 As shown, the method is applied to an optical angle sensor with a regular triangular pyramid structure, and the following is combined with a specific calculation embodiment to illustrate that the method includes the following steps:

[0077] 201. Construct a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establish an expression for the top surface in the spatial rectangular coordinate system.

[0078] Specifically, Figure 4As shown, first, the intersection point of the three side edges of the optical angle sensor is defined as the coordinate origin, and then a spatial rectangular coordinate system is constructed based on the coordinate origin and the three side edges, wherein the three side edges are the X-axis, Y-axis, and Z-axis of the spatial rectangular coordinate system, and finally, in the spatial rectangular coordinate system, the intersection points between the top surface and the X-axis, Y-axis, and Z-axis are obtained, and an expression for the top surface is established based on the intersection points between the top surface and the three coordinate axes.

[0079] In the embodiment of the present application, the intersection point of the three side edges of the optical angle sensor is defined as the coordinate origin, and the coordinates of the coordinate origin are (0, 0, 0), and the top surface is an equilateral triangle with equal lengths of each side. The three points on the top surface are respectively located on the three side edges of the regular triangular prism, and the distance from each point on the top surface to the coordinate origin is equal. Here, the distance is set to 30, and the three intersection points of the top surface and the three coordinate axes are (30, 0, 0), (0, 30, 0) and (0, 0, 30), respectively. Based on the above three points, the expression of the top surface can be established in the spatial rectangular coordinate system as follows:

[0080]

[0081] 202. Determine the incident light ray passing through the coordinate origin in the spatial rectangular coordinate system, and select the target point on the incident light ray.

[0082] Specifically, in a spatial rectangular coordinate system, an incident light ray directed toward the coordinate origin is determined, and a target point is selected on the incident light ray to obtain a coordinate expression of the target point, wherein the coordinate expression of the target point includes the horizontal coordinate, the vertical coordinate, and the vertical coordinate of the target point. The target point is then set to be located on the surface of a sphere with a diameter of a preset value, and a coordinate relationship expression of the target point is established based on the coordinate expression of the target point.

[0083] In the embodiment of the present application, the optical angle sensor is usually used to detect the incident angle of sunlight, and sunlight can be approximately regarded as parallel light. Therefore, no matter from which angle the sunlight irradiates, there must be a ray passing through the coordinate origin. This ray is determined as the incident ray, and a target point is selected on the incident ray. The coordinate expression of this target point in the spatial rectangular coordinate system is established as (X1, Y1, Z1), and then the target point is limited to be located on the surface of a sphere with a preset diameter. The preset value is selected as 1, and the coordinate relationship expression of the target point is:

[0084]

[0085] 203. Calculate the ratio of the current values ​​output by two adjacent light receiving elements according to the current value output by each light receiving element.

[0086] Specifically, the incident angle between the incident light and each side surface is obtained, and then any one of the three side surfaces is selected as a reference surface, and the two side edges located on the reference surface are respectively defined as the first reference axis and the second reference axis, and in addition to the reference surface, the side surface including the first reference axis is defined as the first calculation surface, and the side surface including the second reference axis is defined as the second calculation surface, and then the projection line of the incident light on the reference surface is determined, and the first angle between the projection line and the first reference axis and the second angle between the projection line and the second reference axis are obtained, wherein the first angle and the second angle are complementary to each other, and then based on the preset intensity of the incident light degrees, using Lambert's cosine law, the light intensity received by the first calculation surface is calculated according to the incident angle between the incident light and the reference surface, the incident angle between the incident light and the first calculation surface, and the first angle, and the light intensity received by the second calculation surface is calculated according to the incident angle between the incident light and the reference surface and the second angle, finally, the current value output by the light receiving element on each calculation surface is determined according to the light intensity received by each calculation surface, and the ratio of the current values ​​between two adjacent calculation surfaces is calculated, and then the other two side surfaces are selected as reference surfaces in turn, and the ratio of the current values ​​output by any two adjacent light receiving elements is calculated.

[0087] In the embodiments of the present application, Figure 5 and Figure 6 As shown, first select the XY plane in the spatial rectangular coordinate system as the reference plane, then the X axis is the first reference axis, the Y axis is the second reference axis, the YZ plane is the first calculation plane, and the XZ plane is the second calculation plane; then obtain the incident angle between the incident light and the XY plane as q, the incident angle between the incident light and the YZ plane as p, the angle between the projection line of the incident light in the XY plane and the X axis as α, the angle between the projection line of the incident light in the XY plane and the Y axis as β, and α+β=90°, then assume that the illumination intensity of the incident light is I, according to Lambert's cosine law, the light intensity received by the YZ plane is:

[0088] Iyz=I*cosp,

[0089] Among them, cosp = cosα*cosq, which can be specifically considered as calculating the light intensity component of the incident light on the XY plane. The component of the incident light on the XY plane can be expressed as I*cosq, and then the viewing angle is converted to the direction of the XY plane, such as Figure 6 As shown, the solid line in the figure is the component of the incident light on the XY plane, so the light intensity received on the YZ plane is I*cosq*cosα.

[0090] Similarly, the light intensity received by the XZ plane can be calculated as Ixz=I*cosβ*cosq, where cosβ=sinα. Then the ratio of the photocurrent generated by the XZ plane light receiving element to the photocurrent generated by the XY plane light receiving element is:

[0091]

[0092] Then select the XZ plane and YZ plane as reference planes, and repeat the above calculation process to get

[0093] and

[0094] In the above formula, I Lxy ,I Lyz ,I Lxz are the currents output by the light-receiving elements on each side, and X1, Y1, and Z1 are the coordinates of the target point in the spatial rectangular coordinate system. It can be clearly known that the ratio of the current values ​​output by two adjacent light-receiving elements is related to the specific coordinates of the target point.

[0095] 204. Establish a straight line expression for the incident light according to the relationship between the ratio of the current values ​​and the coordinates of the target point.

[0096] Specifically, first, the ratio of the current values ​​output by two adjacent light-receiving elements in the three side surfaces is obtained, wherein the ratio of the current values ​​includes the ratio of the ordinate to the abscissa of the target point, the ratio of the vertical coordinate to the abscissa of the target point, and the ratio of the vertical coordinate to the ordinate of the target point. Then, the ratio of the current values ​​is substituted into the coordinate relationship expression of the target point to calculate the coordinate value of the target point. Finally, a straight line expression of the incident light is established according to the coordinate value of the target point and the coordinate origin.

[0097] In the embodiment of the present application, the ratio relationship between the horizontal coordinate, the vertical coordinate and the vertical coordinate of the target point is obtained in step 203, and then the coordinate value of the target point is calculated in combination with the coordinate relationship expression of the target point in step 202, that is, each coordinate value in the coordinates (X1, Y1, Z1) of the target point is a known value, and then according to the spatial geometry two-point method, the straight line expression of the incident light is calculated based on the coordinates of the target point and the coordinate origin:

[0098]

[0099] 205. Calculate the elevation angle between the incident light ray and the top surface based on the straight line expression of the incident light ray and the expression of the top surface.

[0100] Specifically, first, the coordinate value of the top surface intersection between the incident light ray and the top surface is calculated based on the straight line expression of the incident light ray and the expression of the top surface, and then the distance between the target point and the top surface intersection is calculated based on the coordinate value of the top surface intersection and the coordinate value of the target point. Then, a perpendicular line is made from the target point to the top surface, and the distance of the perpendicular line is calculated based on the coordinate value of the target point and the expression of the top surface. Finally, the elevation angle between the incident light ray and the top surface is calculated based on the distance of the perpendicular line and the distance between the target point and the top surface intersection.

[0101] In the embodiment of the present application, the top surface intersection point (X2, Y2, Z2) between the incident light and the top surface is obtained according to the straight line expression of the incident light calculated in step 204 and the top surface expression calculated in step 201, that is:

[0102]

[0103] Then, according to the coordinates of the target point (X1, Y1, Z1) and the coordinates of the top surface intersection point (X2, Y2, Z2), the distance a between the target point and the top surface intersection point is calculated as:

[0104]

[0105] Draw a perpendicular line through the target point to the top surface, and compare the perpendicular foot to the top surface. Based on the expression of the top surface, calculate the perpendicular distance H as:

[0106]

[0107] Then the elevation angle θ is calculated. The position relationship of the elevation angle θ in the spatial rectangular coordinate system is as follows: Figure 7 As shown, the elevation angle θ is:

[0108]

[0109] 206. Calculate the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface as the positioning angle of the incident light.

[0110] Specifically, a straight-line expression for the perpendicular is established based on the coordinate value of the target point, the coordinate value of the perpendicular intersecting the foot of the perpendicular on the top surface is calculated based on the straight-line expression for the perpendicular and the expression for the top surface, a straight-line expression for the projection straight line of the incident light ray on the top surface is established based on the coordinate value of the foot of the perpendicular and the coordinate value of the intersection point of the top surface, and the corresponding first vector is obtained, the coordinate value of the reference intersection point between the top surface and the reference axis, and the coordinate value of the projection point of the coordinate origin on the top surface are obtained, a straight-line expression for the projection straight line of the reference axis on the top surface is established based on the coordinate value of the reference intersection point and the coordinate value of the projection point, and the corresponding second vector is obtained, and the positioning angle of the incident light ray is calculated based on the first vector and the second vector.

[0111] In the embodiment of the present application, according to the spatial geometry formula, the target point is located at the incident light, and in step 205, a perpendicular line has been drawn from the target point to the top surface, and the direction vector of the perpendicular line is set to (A, B, C), then the straight line equation of the perpendicular line is:

[0112]

[0113] Since the coordinates of the target point are known, and the direction vector of the perpendicular line is the same as the bottom vector, both (1 / 30, 1 / 30, 1 / 30), the straight line expression of the perpendicular line is:

[0114] X-X1=Y-Y1=Z-Z1,

[0115] Then combine the straight line expression of the perpendicular line with the expression of the top surface to calculate the coordinate value of the foot of the perpendicular (X3, Y3, Z3), which is:

[0116]

[0117] Then the linear expression for calculating the projection line of the incident light on the top surface is:

[0118]

[0119] The first vector of this line is (X3-X2,Y3-Y2,Z3-Z2).

[0120] Then, referring to the steps in step 103, the Z axis is determined as the reference axis, then the coordinates of the intersection of the top surface and the Z axis are (0, 0, 30), the coordinates of the projection of the origin on the top surface are (10, 10, 10), and a plane perpendicular to the top surface is made through the Z axis, and the linear expression of the projection line of the reference axis on the top surface is calculated as follows:

[0121]

[0122] The second vector of this line is (10, 10, -20). The angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface is calculated as the positioning angle γ of the incident light. The position relationship of the positioning angle γ in the spatial rectangular coordinate system is as follows: Figure 8 As shown in the figure, the calculation formula of the positioning angle γ is:

[0123]

[0124] 207. Determine the incident angle of the incident light in the spatial rectangular coordinate system based on the elevation angle and the positioning angle.

[0125] Specifically, after obtaining the elevation angle and the orientation angle, the incident angle of the incident light in the spatial rectangular coordinate system is determined. For the specific method, see step 104, which will not be described in detail here.

[0126] Another light angle detection method provided by the present invention first constructs a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establishes an expression for the top surface in the spatial rectangular coordinate system, then determines the incident light passing through the coordinate origin in the spatial rectangular coordinate system, and selects a target point on the incident light, then calculates the ratio of the current values ​​output by two adjacent light receiving elements according to the current value output by each light receiving element, and then establishes a straight line expression of the incident light according to the coordinate relationship expression between the current value ratio and the target point, and calculates the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface, and then calculates the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface as the positioning angle of the incident light, and finally determines the incident angle of the incident light in the spatial rectangular coordinate system according to the elevation angle and the positioning angle. The above method constructs a spatial rectangular coordinate system and determines the top surface expression, and combines the mathematical relationship between the ratio of current values ​​and the target point coordinates to accurately calculate the straight-line expression of the incident light, and then obtains the elevation angle and positioning angle, ensuring the high accuracy and reliability of angle measurement. It not only improves the accuracy and efficiency of angle measurement, but also enhances the flexibility and adaptability of measurement, and has a wide range of applications.

[0127] Further, as Figure 3 In the specific implementation of the method, the embodiment of the present application provides a light angle detection device, which is applied to an optical angle sensor, such as Fig. 9 As shown, the device includes: a coordinate system establishing module 301, an elevation angle calculating module 302, a positioning angle calculating module 303 and an incident angle determining module 304.

[0128] A coordinate system establishing module 301 is used to construct a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and to establish an expression of the top surface in the spatial rectangular coordinate system;

[0129] The elevation angle calculation module 302 is used to calculate the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, establish a straight line expression of the incident light based on the current value ratio, and calculate the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface;

[0130] The positioning angle calculation module 303 is used to take the bottom surface as a horizontal plane, determine the reference bottom edge in the bottom surface that coincides with the preset horizontal line, define the coordinate axis perpendicular to the reference bottom edge on the horizontal plane as the reference axis, and calculate the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface as the positioning angle of the incident light;

[0131] The incident angle determination module 304 is used to determine the incident angle of the incident light in the spatial rectangular coordinate system according to the elevation angle and the positioning angle.

[0132] In a specific application scenario, the coordinate system establishment module 301 can be used to define the intersection point of the three side edges of the optical angle sensor as the coordinate origin; construct a spatial rectangular coordinate system based on the coordinate origin and the three side edges, wherein the three side edges are the X-axis, Y-axis and Z-axis of the spatial rectangular coordinate system; in the spatial rectangular coordinate system, obtain the intersection points between the top surface and the X-axis, Y-axis and Z-axis respectively, and establish an expression for the top surface based on the intersection points between the top surface and the three coordinate axes.

[0133] In a specific application scenario, the elevation angle calculation module 302 can also be used to determine the incident light directed toward the coordinate origin in a spatial rectangular coordinate system, and select a target point on the incident light to obtain a coordinate expression of the target point, wherein the coordinate expression of the target point includes the horizontal coordinate, vertical coordinate and vertical coordinate of the target point; the target point is set to be located on the surface of a sphere with a preset diameter, and a coordinate relationship expression of the target point is established according to the coordinate expression of the target point.

[0134] In a specific application scenario, the elevation angle calculation module 302 can be specifically used to obtain the incident angle between the incident light and each side surface; select any one of the three side surfaces as a reference surface, define the two side edges located on the reference surface as the first reference axis and the second reference axis respectively, and define the side surface including the first reference axis as the first calculation surface, and define the side surface including the second reference axis as the second calculation surface in addition to the reference surface; determine the projection line of the incident light on the reference surface, obtain the first angle between the projection line and the first reference axis, and the second angle between the projection line and the second reference axis, wherein the first angle and the second angle are complementary to each other; based on Based on the preset intensity of the incident light, Lambert's cosine law is used to calculate the light intensity received by the first calculation surface according to the incident angle between the incident light and the reference surface, the incident angle between the incident light and the first calculation surface, and the first angle, and the light intensity received by the second calculation surface is calculated according to the incident angle between the incident light and the reference surface and the second angle; the current value output by the light receiving element on each calculation surface is determined according to the light intensity received by each calculation surface, and the ratio of the current values ​​between two adjacent calculation surfaces is calculated; and then the other two side surfaces are selected as reference surfaces in turn, and the ratio of the current values ​​output by any two adjacent light receiving elements is calculated.

[0135] In a specific application scenario, the elevation angle calculation module 302 can be specifically used to obtain the ratio of the current values ​​output by two adjacent light-receiving elements in the three side surfaces, wherein the ratio of the current values ​​includes the ratio of the ordinate to the abscissa of the target point, the ratio of the vertical coordinate to the abscissa of the target point, and the ratio of the vertical coordinate to the ordinate of the target point; the ratio of the current values ​​is substituted into the coordinate relationship expression of the target point to calculate the coordinate value of the target point; and a straight line expression of the incident light is established based on the coordinate value of the target point and the coordinate origin.

[0136] In a specific application scenario, the elevation angle calculation module 302 can be specifically used to calculate the coordinate value of the top surface intersection between the incident light and the top surface based on the straight line expression of the incident light and the expression of the top surface; calculate the distance between the target point and the top surface intersection based on the coordinate value of the top surface intersection and the coordinate value of the target point; make a perpendicular line from the target point to the top surface, and calculate the distance of the perpendicular line based on the coordinate value of the target point and the expression of the top surface; calculate the elevation angle between the incident light and the top surface based on the distance of the perpendicular line and the distance between the target point and the top surface intersection.

[0137] In a specific application scenario, the positioning angle calculation module 304 can be specifically used to establish a straight-line expression for a perpendicular line based on the coordinate value of the target point; calculate the coordinate value of the perpendicular line intersecting at the foot of the perpendicular on the top surface based on the straight-line expression for the perpendicular line and the expression for the top surface; establish a straight-line expression for the projection straight line of the incident light ray on the top surface based on the coordinate value of the foot of the perpendicular and the coordinate value of the intersection point of the top surface, and obtain the corresponding first vector; obtain the coordinate value of the reference intersection point between the top surface and the reference axis, as well as the coordinate value of the projection point of the coordinate origin on the top surface, establish a straight-line expression for the projection straight line of the reference axis on the top surface based on the coordinate value of the reference intersection point and the coordinate value of the projection point, and obtain the corresponding second vector; calculate the positioning angle of the incident light ray based on the first vector and the second vector.

[0138] It should be noted that for other corresponding descriptions of the functional units involved in the light angle detection device provided in this embodiment, reference can be made to Figure 2 and Figure 3 The corresponding description in will not be repeated here.

[0139] Based on the above Figure 2 The method shown, accordingly, this embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned light angle detection method is implemented.

[0140] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the light angle detection method of each implementation scene of the present application.

[0141] Based on the above Figure 2 and Figure 3 The method shown, and Fig. 9 In order to achieve the above-mentioned purpose, the embodiment of the light angle detection device shown in the figure is as follows: Fig.10As shown, this embodiment also provides a physical device for detecting light angles, which includes a communication bus, a processor, a memory, and a communication interface, and may also include an input / output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the light angle detection method in the above embodiment.

[0142] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0143] Those skilled in the art will appreciate that the structure of a light angle detection physical device provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0144] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware of the physical device and the software resources to be identified, and supports the operation of the information processing program and other software and / or programs to be identified. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0145] Through the description of the above implementation methods, the technicians in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, firstly, a spatial rectangular coordinate system is constructed based on the three side edges of the optical angle sensor, and an expression of the top surface is established in the spatial rectangular coordinate system, and then the ratio of the current values ​​output by two adjacent light-receiving elements is calculated according to the current value output by each light-receiving element, and a straight line expression of the incident light is established based on the current value ratio, and the elevation angle between the incident light and the top surface is calculated according to the straight line expression of the incident light and the expression of the top surface, and then the bottom surface is taken as a horizontal plane, and the reference bottom edge coincident with the preset horizontal line in the bottom surface is determined, and the coordinate axis perpendicular to the reference bottom edge on the horizontal plane is defined as the reference axis, and the angle between the projection straight line of the incident light on the top surface and the projection straight line of the reference axis on the top surface is calculated as the positioning angle of the incident light, and finally the incident angle of the incident light in the spatial rectangular coordinate system is determined according to the elevation angle and the positioning angle. The above method provides a clear mathematical model for angle measurement by constructing a spatial rectangular coordinate system and determining the top surface expression, and calculates the current ratio based on the current value output by the light-receiving element, and then establishes a linear expression of the incident light, and finally calculates the elevation angle of the incident light relative to the top surface and the positioning angle of the incident light relative to the reference axis, ensuring the high accuracy of the angle measurement; the method combines real-time monitoring and rapid calculation of the current value, can quickly respond to changes in the angle of the incident light, and has a wide range of applications; based on a standardized spatial rectangular coordinate system and mathematical model, the sensor design and data processing process are simplified, and it is easy to integrate with existing systems; the method cross-validates the output of multiple light-receiving elements to improve the robustness of angle measurement; and finally directly calculates the incident angle in the spatial rectangular coordinate system, avoiding the error accumulation that may be introduced in multiple conversions and calculation steps, and improving the accuracy of measurement. The above method combines accurate mathematical models, real-time response capabilities and high integration, effectively improving the accuracy and efficiency of angle measurement.

[0146] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0147] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A light angle detection method, characterized in that: Applied to an optical angle sensor, the optical angle sensor is a regular triangular prism structure, the optical angle sensor includes a top surface, a bottom surface and three side surfaces, each side surface is provided with a light receiving element, the light receiving element is used to receive incident light and output a current value; the method includes: Constructing a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establishing an expression of the top surface in the spatial rectangular coordinate system; Calculating the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, establishing a straight-line expression of the incident light based on the current value ratio, and calculating the elevation angle between the incident light and the top surface according to the straight-line expression of the incident light and the expression of the top surface; Taking the bottom surface as a horizontal plane, determining a reference bottom edge in the bottom surface that coincides with a preset horizontal line, defining a coordinate axis perpendicular to the reference bottom edge on the horizontal plane as a reference axis, and calculating an angle between a projection line of the incident light on the top surface and a projection line of the reference axis on the top surface as a positioning angle of the incident light; The incident angle of the incident light in the spatial rectangular coordinate system is determined according to the elevation angle and the positioning angle.

2. The method according to claim 1, characterized in that The step of constructing a spatial rectangular coordinate system based on the three side edges of the optical angle sensor and establishing an expression of the top surface in the spatial rectangular coordinate system includes: The intersection point of the three side edges of the optical angle sensor is defined as the coordinate origin; Constructing a spatial rectangular coordinate system based on the coordinate origin and the three side edges, wherein the three side edges are respectively the X axis, the Y axis and the Z axis of the spatial rectangular coordinate system; In the spatial rectangular coordinate system, the intersection points between the top surface and the X-axis, the Y-axis and the Z-axis are obtained respectively, and an expression of the top surface is established according to the intersection points between the top surface and the three coordinate axes.

3. The method according to claim 1, characterized in that Before calculating the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, the method further includes: In the spatial rectangular coordinate system, determine an incident light ray directed toward the coordinate origin, and select a target point on the incident light ray to obtain a coordinate expression of the target point, wherein the coordinate expression of the target point includes a horizontal coordinate, a vertical coordinate, and a vertical coordinate of the target point; The target point is set to be located on the surface of a sphere whose diameter is a preset value, and a coordinate relationship expression of the target point is established according to the coordinate expression of the target point.

4. The method according to claim 3, characterized in that: The calculating the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element comprises: Obtaining an incident angle between the incident light and each side surface; Select any one of the three side surfaces as a reference surface, define two side edges located on the reference surface as a first reference axis and a second reference axis respectively, and define a side surface including the first reference axis as a first calculation surface, and define a side surface including the second reference axis as a second calculation surface, except for the reference surface; Determine a projection line of the incident light on the reference plane, and obtain a first angle between the projection line and the first reference axis, and a second angle between the projection line and the second reference axis, wherein the first angle and the second angle are complementary to each other; Based on the preset intensity of the incident light, using Lambert's cosine law, according to the incident angle between the incident light and the reference surface, the incident angle between the incident light and the first calculation surface, and the first angle, calculate the light intensity received by the first calculation surface, and according to the incident angle between the incident light and the reference surface and the second angle, calculate the light intensity received by the second calculation surface; Determine the current value output by the light receiving element on each calculation surface according to the light intensity received by each calculation surface, and calculate the ratio of the current values ​​between two adjacent calculation surfaces; Then, the other two side surfaces are selected as reference surfaces in turn, and the ratio of the current values ​​output by any two adjacent light-receiving elements is calculated.

5. The method according to claim 4, characterized in that The linear expression of the incident light is established based on the ratio of the current values, comprising: Obtaining a ratio of the current values ​​output by two adjacent light-receiving elements in the three side surfaces, wherein the ratio of the current values ​​includes a ratio of the ordinate to the abscissa of the target point, a ratio of the ordinate to the abscissa of the target point, and a ratio of the ordinate to the ordinate of the target point; Substituting the ratio of the current values ​​into the coordinate relationship expression of the target point to calculate the coordinate value of the target point; A straight line expression of the incident light is established according to the coordinate value of the target point and the coordinate origin.

6. The method according to claim 5, characterized in that The calculating the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface comprises: Calculating the coordinate value of the top surface intersection point between the incident light and the top surface according to the straight line expression of the incident light and the top surface expression; Calculating the distance between the target point and the top surface intersection point according to the coordinate value of the top surface intersection point and the coordinate value of the target point; Draw a perpendicular line from the target point to the top surface, and calculate the distance of the perpendicular line according to the coordinate value of the target point and the expression of the top surface; The elevation angle between the incident light and the top surface is calculated according to the distance of the vertical line and the distance between the target point and the intersection point of the top surface.

7. The method according to claim 6, characterized in that The calculating the angle between the projection line of the incident light on the top surface and the projection line of the reference axis on the top surface as the positioning angle of the incident light includes: Establishing a straight line expression of the perpendicular line based on the coordinate value of the target point; The coordinate value of the perpendicular line intersecting the perpendicular line on the top surface is calculated according to the straight line expression of the perpendicular line and the expression of the top surface; According to the coordinate value of the foot of the perpendicular and the coordinate value of the intersection point of the top surface, a straight line expression of the projection line of the incident light on the top surface is established, and a corresponding first vector is obtained; Obtaining the coordinate value of the reference intersection point between the top surface and the reference axis, and the coordinate value of the projection point of the coordinate origin on the top surface, establishing a straight line expression of the projection line of the reference axis on the top surface according to the coordinate value of the reference intersection point and the coordinate value of the projection point, and obtaining the corresponding second vector; The positioning angle of the incident light is calculated according to the first vector and the second vector.

8. A light angle detection device, characterized in that: Applied to an optical angle sensor, the optical angle sensor is a regular triangular prism structure, the optical angle sensor includes a top surface, a bottom surface and three side surfaces, each side surface is provided with a light receiving element, the light receiving element is used to receive incident light and output a current value; the device includes: A coordinate system establishment module, used to construct a spatial rectangular coordinate system based on the three side edges of the optical angle sensor, and establish an expression of the top surface in the spatial rectangular coordinate system; an elevation angle calculation module, used to calculate the ratio of the current values ​​output by two adjacent light-receiving elements according to the current value output by each light-receiving element, establish a straight line expression of the incident light based on the current value ratio, and calculate the elevation angle between the incident light and the top surface according to the straight line expression of the incident light and the expression of the top surface; a positioning angle calculation module, for taking the bottom surface as a horizontal plane, determining a reference bottom edge in the bottom surface that coincides with a preset horizontal line, defining a coordinate axis perpendicular to the reference bottom edge on the horizontal plane as a reference axis, and calculating an angle between a projection line of the incident light on the top surface and a projection line of the reference axis on the top surface as the positioning angle of the incident light; The incident angle determination module is used to determine the incident angle of the incident light in the spatial rectangular coordinate system according to the elevation angle and the positioning angle.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.