Control system and vehicle
By generating control instructions on the microcontroller and generating pulse signals on the programmable logic chip, combined with the redundant protection mechanism of the vehicle controller, the development difficulty and performance consistency problems caused by the change of the microcontroller model are solved, and the selection of products is improved and ensure system security when microcontroller logic is out of control.
Patent Information
- Application Number
- CN202223218042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2032-11-30
AI Technical Summary
When the microcontroller model changes, existing motor control systems face high development costs and long cycles, and inconsistent PWM on-chip resource performance performance affects product performance consistency, and the selection space is reduced when the chip supply is unstable.
By generating the first control instruction on the microcontroller, pulse control signals are generated on the programmable logic chip, the dependence on resources on the microcontroller is reduced, and a redundant protection mechanism is built through the safety control instructions sent by the vehicle controller to ensure the stable operation of the system .
It reduces the development complexity and workload caused by the change of microcontrollers, increases the range of microcontroller selection, improves the competitiveness of the product, and ensures the safe operation of the system when the microcontroller logic is out of control.
Smart Images

Figure CN222147446U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of vehicles, in particular to a control system and a vehicle. Background Art
[0002] Motor control system in related art (see Figure 1 ), the single-chip microcomputer collects the system status according to the design expectation, then calculates the control instructions, and issues control commands to the execution components to achieve the purpose of the control system. Among them, the single-chip microcomputer (including DSP (Digital Signal Processing)) as the core of the controller system directly determines the control quality.
[0003] However, due to the differences in MCUs (such as types, models, configuration methods, functional characteristics, and the functions and performance of complex on-chip resources such as PWM), once the MCU model needs to be changed, developers (motor controller manufacturers) will face great challenges: (1) Customizing and developing a large amount of software for the new MCU will face relatively high development costs and a long cycle. (2) If the performance of complex on-chip resources such as PWM (Pulse Width Modulation) is inconsistent, it will affect the performance consistency of the final product. (3) If complex on-chip resources such as PWM cannot meet system requirements, the system will be unable to use the new MCU model, and in the case of unstable chip supply, developers will face fewer MCU selection options. Utility Model Content
[0004] The utility model aims to solve one of the technical problems in the related art to at least a certain extent. To this end, the first purpose of the utility model is to propose a control system, which can reduce the dependence on the resources within the single-chip microcomputer by generating a first control instruction on the single-chip microcomputer, generating a pulse control signal on the programmable logic chip, and driving the controlled object to run according to the pulse control signal, thereby reducing the challenge difficulty brought by changing the single-chip microcomputer (such as the complexity and workload of software development) and increasing the selection range of the single-chip microcomputer; by stopping the generation of the pulse control signal according to the second control instruction sent by the vehicle controller or the safety control instruction sent by the vehicle controller, a redundant protection mechanism is formed, and even in the case of a single-chip microcomputer logic out of control, the vehicle controller can control the pulse control signal.
[0005] The second objective of the present invention is to provide a vehicle.
[0006] To achieve the above-mentioned purpose, the first aspect of the utility model proposes a control system, comprising: a detection device, configured to detect the operating parameters of a controlled object and obtain corresponding detection values; a single-chip microcomputer, connected to the detection device and to the vehicle controller of the vehicle where the controlled object is located, configured to generate a first control instruction according to the target value of the operating parameter and the detection value, and to generate a second control instruction according to the safety control instruction sent by the vehicle controller; a programmable logic chip, connected to the single-chip microcomputer and to the vehicle controller, configured to generate a pulse control signal according to the first control instruction, and stop generating the pulse control signal when receiving the second control instruction or the safety control instruction sent by the vehicle controller; a driving device, connected to the programmable logic chip, configured to drive the controlled object to operate according to the pulse control signal. According to the control system of the embodiment of the utility model, by generating a first control instruction on the single-chip microcomputer, generating a pulse control signal on the programmable logic chip, and driving the controlled object to operate according to the pulse control signal, it is possible to reduce dependence on the on-chip resources of the single-chip microcomputer, thereby reducing the challenges brought by changing the single-chip microcomputer (such as the complexity and workload of software development) and increasing the range of single-chip microcomputer selection.
[0007] In addition, the control system of the embodiment of the utility model also has the following additional technical features:
[0008] In some examples, the controlled object is a motor, and the detection device includes: a current sensor, connected to the single-chip microcomputer and to the motor, configured to collect the current signal of the motor; a resolver decoder, connected to the single-chip microcomputer and to a resolver encoder mounted on the motor, configured to decode the collected signal of the resolver encoder to obtain a position signal of the motor.
[0009] In some examples, the single chip microcomputer includes: an analog-to-digital converter connected to the current sensor; a first SPI module connected to the resolver decoder; a second SPI module connected to the programmable logic chip; and a central processing unit connected to the analog-to-digital converter, the first SPI module, and the second SPI module, respectively, and configured to obtain the first control instruction based on the current signal and the position signal, and output the first control instruction to the programmable logic chip through the second SPI module, wherein the first control instruction includes pulse width modulation (PWM) duty cycle information.
[0010] In some examples, the programmable logic chip includes: a third SPI module connected to the second SPI module; a pulse generator connected to the third SPI module, configured to generate the pulse control signal according to the first control instruction, wherein the pulse control signal is a PWM waveform signal.
[0011] In some examples, the single-chip microcomputer also includes: a first CAN receiving module, connected to the central processing unit and connected to the vehicle controller; wherein the central processing unit is also configured to output a second control instruction to the programmable logic chip through the second SPI module when the safety control instruction sent by the vehicle controller is received through the first CAN receiving module, so that the programmable logic chip turns off the output of the PWM waveform.
[0012] In some examples, the programmable logic chip also includes: a second CAN receiving module, connected to the vehicle controller; a control module, connected to the second CAN receiving module and the pulse generator, respectively, and configured to control the pulse generator to shut down the output of the PWM waveform when the safety control instruction sent by the vehicle controller is received through the second CAN receiving module.
[0013] In some examples, the single chip microcomputer further includes: a clock module connected to the programmable logic chip and configured to provide a working clock to the programmable logic chip.
[0014] In some examples, the pulse generator is also configured to output an event signal within each cycle of the PWM waveform; the single-chip microcomputer also includes: a general-purpose input and output GPIO module, which is respectively connected to the pulse generator and the central processing unit; wherein the central processing unit is also configured to perform software processing when receiving the event signal sent by the pulse generator through the GPIO module.
[0015] In some examples, the programmable logic chip is a field programmable gate array or a complex programmable logic device.
[0016] In order to achieve the above-mentioned object, the second aspect of the utility model proposes a vehicle, comprising: a controlled object, which is a motor; and the control system.
[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will become apparent from the following description or will be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the mechanism of a motor control system in the related art;
[0019] Figure 2 It is a structural schematic diagram of a control system of an embodiment of the utility model;
[0020] Figure 3It is a structural schematic diagram of a control system of a specific embodiment of the utility model;
[0021] Figure 4 It is a schematic diagram of an event signal of an embodiment of the utility model;
[0022] Figure 5 It is a structural schematic diagram of a vehicle according to an embodiment of the utility model. DETAILED DESCRIPTION
[0023] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0024] Please refer to the following Figure 2-5 A control system and a vehicle according to an embodiment of the present utility model are described.
[0025] Figure 2 Schematic diagram of the control system of an embodiment of the utility model. Figure 2 As shown, the control system 100 includes: a detection device 10 , a single chip computer 20 , a programmable logic chip 30 and a driving device 40 .
[0026] Among them, the detection device 10 is configured to detect the operating parameters of the controlled object and obtain the corresponding detection values; the single-chip computer 20 is connected to the detection device 10 and to the vehicle controller of the vehicle where the controlled object is located, and is configured to generate a first control instruction according to the target value and the detection value of the operating parameter, and to generate a second control instruction according to the safety control instruction sent by the vehicle controller; the programmable logic chip 30 is connected to the single-chip computer 20 and to the vehicle controller, and is configured to generate a pulse control signal according to the first control instruction, and stop generating the pulse control signal when receiving the second control instruction or the safety control instruction sent by the vehicle controller; the driving device 40 is connected to the programmable logic chip 30, and is configured to drive the controlled object to operate according to the pulse control signal.
[0027] Specifically, the detection device 10 detects the operating parameters of the controlled object and obtains the corresponding detection value. The single-chip microcomputer 20 generates a first control instruction according to the target value and the detection value of the operating parameter. The programmable logic chip 30 generates a pulse control signal according to the first control instruction. The driving device 40 drives the controlled object to operate according to the pulse control signal. In addition, the single-chip microcomputer 20 also generates a second control instruction according to the safety control instruction sent by the vehicle controller. When the programmable logic chip 30 receives the second control instruction or the safety control instruction sent by the vehicle controller, it stops generating the pulse control signal. Among them, the programmable logic chip 30 is a field programmable logic gate array or a complex programmable logic device. It should be noted that the software development of the programmable logic chip 30 is a hardware-oriented description (usually Verilog HDL). In most cases, the developed software has higher reusability than the single-chip microcomputer 20. That is to say, the programmable logic chip 30 can independently realize customized hardware functions, which is equivalent to customizing the on-chip resources of the single-chip microcomputer 20, thereby realizing the differentiation of system functions and improving the competitiveness of products. In addition, the programmable logic chip 30 can take on more functions, such as realizing CAN, custom control timing, task acceleration calculation and other functions, thereby improving the computing performance of the system.
[0028] Therefore, by generating the first control instruction on the single-chip microcomputer, generating the pulse control signal on the programmable logic chip, and driving the controlled object to run according to the pulse control signal, the dependence on the single-chip microcomputer's internal resources can be reduced, thereby reducing the challenge of changing the single-chip microcomputer, increasing the single-chip microcomputer selection space, and improving the competitiveness of the product. In addition, when changing the single-chip microcomputer model, a more general model can be selected, and there is no need to deeply study the complex internal resources of various single-chip microcomputers, which reduces the workload and complexity of software development. In addition, by stopping the generation of the pulse control signal according to the second control instruction sent by the vehicle controller or the safety control instruction sent by the vehicle controller, a redundant protection mechanism is formed. Even if the single-chip microcomputer logic is out of control, the vehicle controller can control the pulse control signal.
[0029] As an example, the controlled object is a motor, see Figure 3 , the detection device 10 may include: a current sensor 11 and a resolver decoder 12. The current sensor 11 is connected to the single-chip microcomputer 20 and the motor, and is configured to collect the current signal of the motor; the resolver decoder 12 is connected to the single-chip microcomputer 20 and the resolver encoder installed on the motor, and is configured to decode the collected signal of the resolver encoder to obtain the position signal of the motor.
[0030] Specifically, the current sensor 11 collects the current signal of the motor (such as a three-phase current signal), and the resolver decoder 12 decodes the collected signal of the resolver encoder installed on the motor to obtain the position signal of the motor. Thus, the operating parameters of the motor are obtained through the current sensor and the resolver decoder.
[0031] As an example, see Figure 3 , the single chip computer 20 may include: an analog-to-digital converter 21, a first SPI module 22, a second SPI module 23 and a central processing unit 24. The analog-to-digital converter 21 is connected to the current sensor 11; the first SPI module 22 is connected to the resolver decoder 12; the second SPI module 23 is connected to the programmable logic chip 30; the central processing unit 24 is respectively connected to the analog-to-digital converter 21, the first SPI module 22, and the second SPI module 23, and is configured to obtain a first control instruction according to the current signal and the position signal, and output the first control instruction to the programmable logic chip 30 through the second SPI module 23, wherein the first control instruction includes pulse width modulation PWM duty cycle information.
[0032] Specifically, the central processor 24 obtains the pulse width modulation PWM duty cycle information according to the current signal transmitted by the analog-to-digital converter 21, the position signal transmitted by the first SPI module 22, and the target values corresponding to the current signal and the position signal, using a typical FOC motor control algorithm, and outputs the pulse width modulation PWM duty cycle information to the programmable logic chip 30 through the second SPI module 23. Thus, the pulse width modulation PWM duty cycle information in the first control instruction is generated by the target value and the detection value of the operating parameter.
[0033] As an example, see Figure 3 , the programmable logic chip 30 may include: a third SPI module 31 and a pulse generator 32. The third SPI module 31 is connected to the second SPI module 23; the pulse generator 32 is connected to the third SPI module 31, and is configured to generate a pulse control signal according to the first control instruction, wherein the pulse control signal is a PWM waveform signal.
[0034] Specifically, the pulse generator 32 generates a PWM waveform signal using a custom algorithm according to the pulse width modulation PWM duty cycle information in the first control instruction transmitted by the third SPI module 31. It should be noted that the functional modules in the programmable logic chip 30 can be flexibly reconfigured to cope with different product application scenarios. Thus, the PWM waveform signal is generated through the pulse width modulation PWM duty cycle information in the first control instruction.
[0035] As an example, see Figure 3The single-chip computer 20 may also include: a first CAN receiving module 25, connected to the central processing unit 24, and connected to the vehicle controller of the vehicle where the motor is located; wherein the central processing unit 24 is also configured to output a second control instruction to the programmable logic chip 30 through the second SPI module 23 when receiving a safety control instruction sent by the vehicle controller through the first CAN receiving module 25, so that the programmable logic chip 30 turns off the output of the PWM waveform.
[0036] Specifically, when the central processing unit 24 receives the safety control instruction sent by the vehicle controller through the first CAN receiving module 25, it outputs the second control instruction to the programmable logic chip 30 through the second SPI module 23, so that the programmable logic chip 30 turns off the output of the PWM waveform. Among them, the safety control instruction is used to inform the motor controller to put the PWM waveform in a safe state, where "safe state" includes "turning off the PWM waveform output" or other PWM waveforms specified by the system. In this example, the safe state refers to turning off the PWM waveform output. Therefore, the output of the PWM waveform is turned off through the safety control instruction.
[0037] As an example, see Figure 3 The programmable logic chip 30 may further include: a second CAN receiving module 33 and a control module 34. The second CAN receiving module 33 is connected to the vehicle controller of the vehicle where the motor is located; the control module 34 is connected to the second CAN receiving module 33 and the pulse generator 32 respectively, and is configured to control the pulse generator 32 to turn off the output of the PWM waveform when receiving the safety control instruction sent by the vehicle controller through the second CAN receiving module 33.
[0038] Specifically, when the control module 34 receives the safety control instruction sent by the vehicle controller through the second CAN receiving module 33, it controls the pulse generator 32 to turn off the output of the PWM waveform. Therefore, through the redundant protection mechanism formed by the second CAN receiving module and the control module, even if the single-chip logic is out of control, the vehicle controller can also control the PWM waveform to be in a safe state.
[0039] As an example, see Figure 3 The single-chip microcomputer 20 may further include: a clock module 26 connected to the programmable logic chip 30 and configured to provide a working clock to the programmable logic chip 30. Therefore, by setting a clock module in the single-chip microcomputer to provide a working clock to the programmable logic chip, a separate external clock source of the programmable logic chip can be saved, thereby reducing costs.
[0040] As an example, the single-chip microcomputer 20 may also include: a general-purpose input and output GPIO module 27, which is respectively connected to the pulse generator 32 and the central processing unit 24; wherein the central processing unit 24 is also configured to perform software processing when receiving an event signal sent by the pulse generator 32 through the general-purpose input and output GPIO module 27.
[0041] Specifically, the pulse generator 32 is a multi-channel timer unit, which can generate an event signal at any position of the PWM waveform through programming, such as generating an event signal at the rising edge of the PWM waveform. Figure 4 , the 6-way PWM waveform is synchronous, so only one PWM waveform is drawn, PwmT is the period of the PWM waveform, and by setting the preset time EvT, the event signal can be output at time t1 (t2>t1>t0). When the central processor 24 receives the event signal, it performs software processing, that is, obtains the first control instruction according to the current signal and the position signal. Therefore, the single-chip microcomputer can perform software processing when receiving the event signal.
[0042] To summarize, this control system, by generating pulse width modulation (PWM) duty cycle information on the single-chip microcomputer, autonomously programming and generating PWM waveform signals on the programmable logic chip, and driving the controlled object to operate according to the PWM waveform signals, can reduce dependence on the on-chip resources of the single-chip microcomputer, thereby reducing the challenges brought by changing the single-chip microcomputer (such as the complexity and workload of software development), increasing the range of single-chip microcomputer selection, and reducing development costs; through the redundant protection mechanism composed of the second CAN receiving module and the control module, even in the case of a single-chip microcomputer logic out of control, the vehicle controller can control the PWM waveform to be in a safe state.
[0043] Figure 5 Schematic diagram of the structure of a vehicle according to an embodiment of the present utility model. Figure 5 As shown, a vehicle 200 includes: a controlled object 210, which is a motor; and the above-mentioned control system 100.
[0044] Therefore, the vehicle, through the controlled object and the above-mentioned control system, generates pulse width modulation PWM duty cycle information on the single-chip microcomputer, independently programs and generates PWM waveform signals on the programmable logic chip, and drives the controlled object to operate according to the PWM waveform signals. This can reduce dependence on the resources within the single-chip microcomputer, thereby reducing the challenges brought by changing the single-chip microcomputer (such as the complexity and workload of software development), increasing the range of single-chip microcomputer selection, and reducing development costs; through the redundant protection mechanism composed of the second CAN receiving module and the control module, even in the case of a loss of control of the single-chip microcomputer logic, the vehicle controller can control the PWM waveform to be in a safe state.
[0045] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the utility model. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0046] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred module or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0047] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present utility model, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0048] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0049] In the present utility model, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0050] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present invention. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A control system, characterized in that: include: A detection device is configured to detect an operating parameter of the motor and obtain a corresponding detection value, wherein the detection device includes a current sensor and a resolver decoder, the current sensor is connected to the motor and is configured to collect a current signal of the motor, and the resolver decoder is connected to a resolver encoder installed on the motor and is configured to decode the collected signal of the resolver encoder to obtain a position signal of the motor; A single chip microcomputer, connected to the current sensor and the resolver decoder respectively, and connected to a vehicle controller of a vehicle in which the motor is located, and configured to generate a first control instruction according to the target value of the operating parameter and the detection value, and to generate a second control instruction according to the safety control instruction sent by the vehicle controller; a programmable logic chip, connected to the single-chip microcomputer and to the vehicle controller, configured to generate a pulse control signal according to the first control instruction, and to stop generating the pulse control signal when receiving the second control instruction or a safety control instruction sent by the vehicle controller; The driving device is connected to the programmable logic chip and is configured to drive the motor to operate according to the pulse control signal.
2. The control system according to claim 1, characterized in that: The controlled object is a motor, and the detection device comprises: A current sensor, connected to the single chip microcomputer and the motor, and configured to collect a current signal of the motor; The resolver decoder is connected to the single-chip microcomputer and to the resolver encoder mounted on the motor, and is configured to decode the acquisition signal of the resolver encoder to obtain the position signal of the motor.
3. The control system according to claim 1, characterized in that: The single chip microcomputer comprises: an analog-to-digital converter, connected to the current sensor; A first SPI module is connected to the resolver decoder; A second SPI module connected to the programmable logic chip; The central processing unit is respectively connected to the analog-to-digital converter, the first SPI module, and the second SPI module, and is configured to obtain the first control instruction according to the current signal and the position signal, and output the first control instruction to the programmable logic chip through the second SPI module, wherein the first control instruction includes pulse width modulation (PWM) duty cycle information.
4. The control system according to claim 3, characterized in that: The programmable logic chip comprises: A third SPI module, connected to the second SPI module; A pulse generator is connected to the third SPI module and is configured to generate the pulse control signal according to the first control instruction, wherein the pulse control signal is a PWM waveform signal.
5. The control system according to claim 4, characterized in that: The single chip microcomputer also includes: A first CAN receiving module is connected to the central processing unit and to the vehicle controller; Among them, the central processing unit is also configured to output a second control instruction to the programmable logic chip through the second SPI module when the safety control instruction sent by the vehicle controller is received through the first CAN receiving module, so that the programmable logic chip turns off the output of the PWM waveform.
6. The control system according to claim 5, characterized in that: The programmable logic chip also includes: A second CAN receiving module is connected to the vehicle controller; The control module is connected to the second CAN receiving module and the pulse generator respectively, and is configured to control the pulse generator to turn off the output of the PWM waveform when the safety control instruction sent by the vehicle controller is received through the second CAN receiving module.
7. The control system according to claim 1, characterized in that: The single chip microcomputer also includes: The clock module is connected to the programmable logic chip and is configured to provide a working clock to the programmable logic chip.
8. The control system according to claim 4, characterized in that: The pulse generator is further configured to output an event signal within each cycle of the PWM waveform; the single chip microcomputer further includes: A general purpose input and output GPIO module, connected to the pulse generator and the central processing unit respectively; Wherein, the central processing unit is further configured to perform software processing when receiving the event signal sent by the pulse generator through the GPIO module.
9. The control system according to claim 1, characterized in that: The programmable logic chip is a field programmable logic gate array or a complex programmable logic device.
10. A vehicle, characterized in that: include: Motor; A control system as claimed in any one of claims 1 to 9.
