Control circuit, microcontroller and control method

By using a control circuit and microcontroller that dynamically adjusts the sampling frequency, the problems of high power consumption at high frequencies and low reliability at low frequencies in the sampling circuit are solved, achieving high energy efficiency and high reliability of the sampling circuit under different conditions.

CN122159873APending Publication Date: 2026-06-05NUVOTON

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NUVOTON
Filing Date
2025-06-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing sampling circuits consume a lot of power at high sampling frequencies and have low signal reliability at low sampling frequencies, making it difficult to find a balance between power consumption and reliability.

Method used

The sampling frequency is dynamically adjusted by detection and processing circuits. The sampling frequency is adjusted based on preset conditions. The sampling process is optimized using inference models and parameter sets.

Benefits of technology

While ensuring signal reliability, the sampling frequency is dynamically adjusted to reduce power consumption, achieving high efficiency and high reliability of the sampling circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122159873A_ABST
    Figure CN122159873A_ABST
Patent Text Reader

Abstract

The present application provides a control circuit, a microcontroller and a control method. The control circuit includes a detection circuit, a sampling circuit and an operation circuit. The detection circuit collects an external information to generate a detection signal. The sampling circuit has a sampling frequency and samples the detection signal to generate a sampling signal. The operation circuit inputs the sampling signal into an inference model to generate an inference result, and judges whether a preset condition is satisfied according to the inference result. When the preset condition is satisfied, the operation circuit adjusts the sampling frequency from a first preset value to a second preset value. When the preset condition is not satisfied, the operation circuit maintains the sampling frequency at the first preset value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a control circuit, and more particularly to a control circuit for dynamically adjusting the sampling frequency. Background Technology

[0002] With the advancement of technology, electronic products are becoming increasingly diverse in type and function. Most electronic products contain at least one sampling circuit. This circuit samples an input signal at a sampling frequency to generate a sampled signal. Higher sampling frequencies result in more accurate sampled signals but increase the power consumption of the sampling circuit. Lowering the sampling frequency to save power may significantly reduce the reliability of the sampled signal. Summary of the Invention

[0003] An embodiment of the present invention provides a control circuit, including a detection circuit, a sampling circuit, and an arithmetic circuit. The detection circuit collects external information to generate a detection signal. The sampling circuit has a sampling frequency and samples the detection signal to generate a sampling signal. The arithmetic circuit inputs the sampling signal into an inference model to generate an inference result, and determines whether a preset condition is met based on the inference result. When the preset condition is met, the arithmetic circuit adjusts the sampling frequency from a first preset value to a second preset value. When the preset condition is not met, the arithmetic circuit maintains the sampling frequency at the first preset value.

[0004] The present invention also provides a microcontroller, including a detection circuit, a sampling circuit, an arithmetic circuit, and a processing circuit. The detection circuit collects external information to generate a detection signal. The sampling circuit has a sampling frequency and samples the detection signal to generate a sampling signal. The arithmetic circuit inputs the sampling signal into an inference model to generate an inference result, and determines whether a preset condition is met based on the inference result. The processing circuit executes a preset operation based on the sampling signal. When the preset condition is not met, the arithmetic circuit inputs a first set of parameters into the inference model. When the preset condition is met, the arithmetic circuit inputs a second set of parameters into the inference model and adjusts the sampling frequency.

[0005] The present invention further provides a control method, comprising: setting a sampling frequency to a first preset value; sampling a detection signal to generate a sampling signal; providing the sampling signal and a first parameter set to an inference model to generate an inference result; and determining, based on the inference result, whether the sampling frequency needs to be changed. When the sampling frequency does not need to be changed, the first parameter set is provided to the inference model. When the sampling frequency needs to be changed, the sampling frequency is set to a second preset value, a sampling signal and a second parameter set are provided to the inference model, and it is determined whether the sampling frequency needs to be changed again. When the sampling frequency needs to be changed again, the sampling frequency is set to the first preset value, and the first parameter set is provided to the inference model. When the sampling frequency does not need to be changed again, the second parameter set is continued to be provided to the inference model.

[0006] The control method of the present invention can be implemented via the control circuit and microcontroller of the present invention, which can be hardware or firmware capable of performing specific functions, or can be implemented by storing program code in a storage medium and combining it with specific hardware. When the program code is loaded and executed by an electronic device, processor, computer or machine, the electronic device, processor, computer or machine becomes a device for executing the control circuit and microcontroller of the present invention. Attached Figure Description

[0007] Figure 1 This is a schematic diagram of the microcontroller of the present invention.

[0008] Figure 2 This is a schematic diagram of the control circuit of the present invention.

[0009] Figure 3 This is another schematic diagram of the control circuit of the present invention.

[0010] Figure 4 This is another schematic diagram of the control circuit of the present invention.

[0011] Figure 5 This is another schematic diagram of the control circuit of the present invention.

[0012] Figure 6 This is a flowchart illustrating the control method of the present invention.

[0013] Symbol Explanation

[0014] 100: Microcontroller

[0015] 110, 200: Control circuit

[0016] 120: Processing circuit

[0017] IN1~IN3: External Information

[0018] SO1, SO2: Output signals

[0019] SWU: Wake-up signal

[0020] SW: Warning message

[0021] SP: Signal Processing

[0022] 130: Direct Memory Access Circuit

[0023] 140: Memory

[0024] 210: Detection circuit

[0025] 220: Sampling circuit

[0026] 221, 321, 322, 421, 422, 521-523: Subsampling circuits

[0027] 230: Operational Circuit

[0028] 211, 311, 312, 411, 412, 511-513: Sensors

[0029] SD1~SD3: Detection signals

[0030] RA1~RA3: Sampling frequency

[0031] SS1~SS3: Sampling signals

[0032] MD: Inference Model

[0033] IR: Inference Results

[0034] SC: Control signal

[0035] 231, 250, 260, 350, 360, 331, 332, Rg1~RgN: Storage circuits

[0036] 232: Judgment Circuit

[0037] 240, 340, 540: Multiplexer

[0038] PG1~PGN: Parameter groups

[0039] 440: Selection Circuit

[0040] S611~S616: Steps Detailed Implementation

[0041] To make the objectives, features, and advantages of this invention more apparent and understandable, embodiments are provided below, along with detailed descriptions in conjunction with the accompanying drawings. This specification provides different embodiments to illustrate the technical features of different implementations of the invention. The configuration of the elements in the embodiments is for illustrative purposes only and is not intended to limit the invention. Furthermore, the repetition of some reference numerals in the embodiments is for simplification and does not imply any correlation between different embodiments.

[0042] Figure 1 This is a schematic diagram of the microcontroller of the present invention. Figure 1 As shown, the microcontroller 100 includes a control circuit 110 and a processing circuit 120. The control circuit 110 detects external information IN1 to generate an output signal SO1. In one possible embodiment, the control circuit 110 has a sensor (not shown) for detecting the external information IN1. In this example, the control circuit 110 samples the external information IN1 and uses the sampling result as the output signal SO1.

[0043] In this embodiment, the control circuit 110 determines whether a preset condition is met based on external information IN1. If the preset condition is not met, the control circuit 110 does not adjust the sampling frequency. If the preset condition is met, the control circuit 110 adjusts the sampling frequency. In some embodiments, when the preset condition is met, the control circuit 110 may enable a wake-up signal SWU. In one possible embodiment, the microcontroller 100 may be applied to a wearable medical device, a telemedicine device, or a precision medicine device.

[0044] In other embodiments, the control circuit 110 further detects an external information IN2. In this example, the control circuit 110 determines whether a preset condition is met based on the external information IN1. If so, the control circuit 110 adjusts a sampling frequency and samples the external information IN2 according to the adjusted sampling frequency, and uses the sampling result as the output signal SO1.

[0045] This invention does not limit the types of external information IN1 and IN2. External information IN1 or IN2 may be continuous information or discrete information. In some embodiments, at least one of external information IN1 and IN2 may be a physical feature, a physiological feature, an electrical feature, or an environmental feature. Taking external information IN1 as an example, external information IN1 may be temperature information, pressure information, flow rate information, displacement information, acceleration information, current information, humidity information, chemical concentration information, audio information, electrocardiogram information, or blood oxygen concentration information. In one possible embodiment, the type of external information IN1 is different from the type of external information IN2. For example, external information IN1 may be blood pressure information, and external information IN2 may be blood oxygen information.

[0046] Processing circuit 120 performs a preset operation based on output signal SO1. In one possible embodiment, processing circuit 120 determines whether an abnormal event has occurred based on output signal SO1. When an abnormal event occurs, processing circuit 120 issues a warning message SW. The warning message SW may be an audible warning or a visual warning. In other embodiments, processing circuit 120 processes output signal SO1 to generate a processing signal SP. Processing circuit 120 may provide processing signal SP to a direct memory access (DMA) circuit 130, requesting DMA circuit 130 to store processing signal SP in a corresponding memory. In another possible embodiment, processing circuit 120 stores processing signal SP in memory 140. In some embodiments, processing circuit 120 directly uses output signal SO1 as processing signal SP.

[0047] In other embodiments, when the processing circuit 120 is idle, it may enter a sleep mode. In sleep mode, the processing circuit 120 does not operate, such as ceasing to execute a preset operation. In this example, when the wake-up signal SWU is enabled, the processing circuit 120 leaves the sleep mode and enters a normal mode. In normal mode, the processing circuit 120 executes a preset operation according to the output signal SO1.

[0048] Figure 2 This is a schematic diagram of the control circuit of the present invention. As shown, the control circuit 200 includes a detection circuit 210, a sampling circuit 220, and an arithmetic circuit 230. The detection circuit 210 collects external information IN1 to generate a detection signal SD1. The present invention does not limit the architecture of the detection circuit 210. In one possible embodiment, the detection circuit 210 has a sensor 211. The sensor 211 detects the external information IN1 to generate a detection signal SD1. The present invention does not limit the type of sensor 211. The sensor 211 may be a temperature sensor, a pressure sensor, a flow sensor, a displacement sensor, an acceleration sensor, a current sensor, a humidity sensor, a chemical concentration sensor, an audio sensor, an electrocardiogram sensor, a blood oxygen concentration sensor, a gyroscope sensor, or a resistive sensor.

[0049] The sampling circuit 220 has a sampling frequency RA1 and samples a detection signal SD1 to generate a sampling signal SS1. In this embodiment, the sampling circuit 220 includes a primary sampling circuit 221. The primary sampling circuit 221 samples the detection signal SD1 according to the sampling frequency RA1 to generate the sampling signal SS1. In a possible embodiment, the sampling signal SS1 serves as the output signal SO1.

[0050] In this embodiment, the subsampling circuit 221 performs a corresponding number of sampling operations on the detection signal SD1 according to the sampling frequency RA1. For example, assuming the sampling frequency RA1 is equal to a first preset value, the number of sampling operations performed by the subsampling circuit 221 within a preset period is a first value (e.g., 100). When the sampling frequency RA1 is equal to a second preset value, the number of sampling operations performed by the subsampling circuit 221 within the same preset period is a second value (e.g., 1000). In this example, the second value may be higher than the first value, but this is not intended to limit the invention. In other embodiments, the second value is lower than the first value.

[0051] The arithmetic circuit 230 inputs the sampling signal SS1 into an inference model MD to generate an inference result IR, and determines whether a preset condition is met based on the inference result IR. When the preset condition is met, the arithmetic circuit 230 generates a control signal SC to adjust (increase or decrease) the sampling frequency RA1 from a first preset value to a second preset value. When the preset condition is not met, the arithmetic circuit 230 maintains the sampling frequency RA1 at the first preset value through the control signal SC. In some embodiments, when the preset condition is met, the arithmetic circuit 230 enables the wake-up signal SWU.

[0052] For example, when the external information IN1 changes drastically, it indicates that a preset condition has been met. Therefore, the arithmetic circuit 230 generates a control signal SC to adjust the sampling frequency RA1 from a first preset value (e.g., 1Hz) to a second preset value (e.g., 100Hz). When the external information IN1 is in a stable range, indicating that the preset condition has not been met, the arithmetic circuit 230 maintains the sampling frequency RA1 at the first preset value (e.g., 1Hz) or adjusts the sampling frequency RA1 from the second preset value (e.g., 100Hz) back to the first preset value (e.g., 1Hz) through the control signal SC.

[0053] In other embodiments, when the external information IN1 is within a stable range, it indicates that a preset condition has been met. Therefore, the arithmetic circuit 230 generates a control signal SC to reduce the sampling frequency RA1 from a first preset value (e.g., 44 kHz) to a second preset value (e.g., 1 kHz). In this example, when the external information IN1 is not within a stable range, it indicates that the preset condition has not been met. Therefore, the arithmetic circuit 230 increases the sampling frequency RA1 through the control signal SC, such as adjusting it from the second preset value (e.g., 1 kHz) to the first preset value (e.g., 44 kHz).

[0054] In some embodiments, the arithmetic circuit 230 inputs a corresponding set of parameters to the inference model MD according to the sampling frequency RA1. For example, when the sampling frequency RA1 is equal to a first preset value, the arithmetic circuit 230 inputs the sampled signal SS1 and a set of parameters PG1 (or the first set of parameters) into the inference model MD. When the sampling frequency RA1 is equal to a second preset value, the arithmetic circuit 230 inputs the sampled signal SS1 and a set of parameters PG2 (or the second set of parameters) into the inference model MD. In some embodiments, each of the parameter sets PG1 and PG2 includes multiple parameters.

[0055] This invention does not limit the architecture of the computation circuit 230. In one possible embodiment, the computation circuit 230 includes a storage circuit 231 and a decision circuit 232. The storage circuit 231 stores the inference model MD. This invention does not limit the type of the inference model MD. In one possible embodiment, the inference model MD is a recurrent neural network (RNN) model, such as long short-term memory (LSTM) or a gated recurrent unit (GRU).

[0056] The decision circuit 232 reads from the storage circuit 231 to execute the inference model MD. During an initial period, the decision circuit 232 inputs the parameter set PG1 and the sampling signal SS1 into the inference model MD to obtain an inference result IR. The decision circuit 232 may store the inference result IR in the storage circuit 231 or in a separate storage circuit (different from storage circuit 231). Based on the inference result IR, the decision circuit 232 determines whether a preset condition is met and generates a control signal SC to adjust the sampling frequency RA1 based on the determination result. In one possible embodiment, the decision circuit 232 enables the wake-up signal SWU based on the determination result.

[0057] In other embodiments, the control circuit 200 further includes a multiplexer 240. The multiplexer 240 receives parameter sets PG1 and PG2. In this example, the multiplexer 240 provides parameter set PG1 or PG2 to the arithmetic circuit 230 according to the control signal SC. When the arithmetic circuit 230 sets the sampling frequency RA1 to a first preset value via the control signal SC, the multiplexer 240 provides parameter set PG1 to the arithmetic circuit 230 according to the control signal SC. When the arithmetic circuit 230 sets the sampling frequency RA1 to a second preset value via the control signal SC, the multiplexer 240 provides parameter set PG2 to the arithmetic circuit 230 according to the control signal SC.

[0058] In some embodiments, the control circuit 200 further includes storage circuits 250 and 260. Storage circuit 250 stores parameter group PG1. Storage circuit 260 stores parameter group PG2. In one possible embodiment, storage circuits 250 and 260 are two independent memories. In another possible embodiment, storage circuits 250 and 260 are the same memory. In this example, parameter groups PG1 and PG2 are stored in different memory blocks.

[0059] Figure 3 This is another schematic diagram of the control circuit of the present invention. As shown, the control circuit 300 includes a detection circuit 310, a sampling circuit 320, and an arithmetic circuit 330. The detection circuit 310 detects external information IN1 and IN2 to generate detection signals SD1 and SD2. The type of external information IN2 may be the same as or different from that of external information IN1. Since the characteristics of external information IN2 are the same as those of external information IN1, they will not be described in detail.

[0060] In this embodiment, the detection circuit 310 includes sensors 311 and 312. Sensor 311 collects external information IN1 to generate a detection signal SD1. Sensor 312 collects external information IN2 to generate a detection signal SD2. Since the characteristics of sensors 311 and 312 are similar... Figure 2 The sensor 211 is used, so it will not be described in detail.

[0061] In some embodiments, external information IN1 is a first physiological characteristic, and external information IN2 is a second physiological characteristic. In this example, the first physiological characteristic is different from the second physiological characteristic. For example, sensor 311 is a blood oxygen saturation sensor, and sensor 312 is an electrocardiogram (ECG) sensor. In this example, control circuit 300 may be used for medical monitoring.

[0062] In another possible embodiment, sensor 311 is a resistive sensor used to measure changes in the resistance of the skin surface. Sensor 312 may be an accelerometer, a blood oxygen sensor, or an electrocardiogram sensor. In this example, control circuitry 300 is used to monitor human physiological and emotional states. In some embodiments, sensor 311 is a temperature sensor or a pressure sensor, while sensor 312 is a flow sensor. In this example, control circuitry 300 is applied in an industrial automation system. In another possible embodiment, sensor 311 is a gyroscope sensor, and sensor 312 is an accelerometer. In this example, control circuitry 300 is used to track the movement of objects.

[0063] Sampling circuit 320 generates sampling signal SS1 by sampling detection signal SD1 based on sampling frequency RA2. Sampling circuit 320 also generates sampling signal SS2 by sampling detection signal SD2 based on sampling frequency RA1. In one possible embodiment, sampling signal SS2 serves as output signal SO1. In this embodiment, sampling frequency RA2 is fixed, but this is not intended to limit the invention. In other embodiments, both sampling frequencies RA1 and RA2 are adjustable.

[0064] The present invention does not limit the architecture of the sampling circuit 320. In one possible embodiment, the sampling circuit 320 includes sub-sampling circuits 321 and 322. Sub-sampling circuit 321 samples and detects signal SD1 according to sampling frequency RA2 to generate sampling signal SS1. Sub-sampling circuit 322 samples and detects signal SD2 according to sampling frequency RA1 to generate sampling signal SS2.

[0065] The arithmetic circuit 330 inputs a sampling signal SS1 and a parameter set PG1 to the inference model MD to generate an inference result IR. Based on the inference result IR, the arithmetic circuit 330 determines whether a preset condition is met. When the preset condition is not met, the arithmetic circuit 330 maintains the sampling frequency RA1 at a first preset value and uses the parameter set PG1. When the preset condition is met, the arithmetic circuit 330 adjusts the sampling frequency RA1 to a second preset value via the control signal SC and uses the parameter set PG2. In this embodiment, the sampling frequency RA2 remains fixed regardless of whether the preset condition is met. In some embodiments, the inference model MD may be stored in the storage circuit 331. The inference result IR may be stored in the storage circuit 332.

[0066] In one possible embodiment, it is assumed that sensors 311 and 312 are both sound sensors. The subsampling circuit 321 samples the detection signal SD1 according to the sampling frequency RA2 to analyze the characteristics of the audio signal. In this case, the subsampling circuit 321 may sample the detection signal SD1 at a low sampling frequency (e.g., 1 kHz). When the arithmetic circuit 330 learns from the sampling signal SS1 that the external information IN1 has changed significantly, the arithmetic circuit 330 adjusts the sampling frequency RA1, commanding the subsampling circuit 322 to increase the number of samples. At this time, the sampling frequency RA1 of the subsampling circuit 322 may be increased from an initial frequency to a preset frequency (e.g., 44.1 kHz or higher) to capture the details of the audio signal.

[0067] In other embodiments, sensors 311 and 312 are different types of sensors. For example, assume sensor 311 is a blood oxygen saturation sensor and sensor 312 is an electrocardiogram (ECG) sensor. In this example, the subsampling circuit 321 samples the detection signal SD1 at a fixed sampling rate (e.g., 1 Hz) according to the sampling frequency RA2. When the arithmetic circuit 330 learns from the sampled signal SS1 that the external information IN1 has changed significantly, the arithmetic circuit 330 adjusts the sampling frequency RA1, requiring the subsampling circuit 322 to perform sampling operations at a preset sampling rate. At this time, the subsampling circuit 322 may sample the detection signal SD2 at a high sampling frequency (e.g., 200 Hz or higher). Since the arithmetic circuit 330 increases the sampling frequency of the subsampling circuit 322, the accuracy and reliability of the output signal SO1 can be increased. However, when the arithmetic circuit 330 learns from the sampled signal SS1 that the external information IN1 remains in a stable range, the arithmetic circuit 330 maintains the sampling frequency RA1 at an initial frequency. Since the operational circuit 330 dynamically controls the sampling frequency of the secondary sampling circuit 322, the power consumption of the secondary sampling circuit 322 can be reduced.

[0068] In other embodiments, the control circuit 300 further includes a multiplexer 340 and storage circuits 350 and 360. Since the characteristics of the multiplexer 340, storage circuits 350 and 360 are similar... Figure 2 The multiplexer 240, storage circuits 250 and 260 are not described in detail here.

[0069] Figure 4 This is another schematic diagram of the control circuit of the present invention. As shown in the figure, the control circuit 400 includes a detection circuit 410, a sampling circuit 420, an arithmetic circuit 430, a selection circuit 440, and storage circuits Rg1 to RgN. Since the characteristics of the detection circuit 410, the sampling circuit 420, and the arithmetic circuit 430 are similar... Figure 3 The detection circuit 310, sampling circuit 320, and arithmetic circuit 330 are described in detail, so they will not be repeated here.

[0070] Selection circuit 440 outputs one parameter group PG1 to PGN to arithmetic circuit 430 according to control signal SC. In one possible embodiment, parameter groups PG1 to PGN are stored in storage circuits Rg1 to RgN respectively. In this example, storage circuits Rg1 to RgN may be different memories. In another possible embodiment, parameter groups PG1 to PGN are stored in the same memory.

[0071] When a first preset condition is not met, the arithmetic circuit 430 maintains the sampling frequency RA1 at a first preset value through the control signal SC, and requests the selection circuit 440 to provide parameter group PG1. When the first preset condition is met (the detection signal SD1 has a first slope), the arithmetic circuit 430 sets the sampling frequency RA1 to a second preset value through the control signal SC, and requests the selection circuit 440 to provide parameter group PG2.

[0072] In other embodiments, when the sampling frequency RA1 is a second preset value, the arithmetic circuit 430 determines whether a second preset condition is met based on the inference result IR. When the second preset condition is not met, the arithmetic circuit 430 maintains the sampling frequency RA1 at the second preset value. When the second preset condition is met (e.g., the detection signal SD1 has a second slope), the arithmetic circuit 430 sets the sampling frequency RA1 to a third preset value via the control signal SC and requests the selection circuit 440 to provide parameter group PG3 (not shown). In this embodiment, the sampling frequency RA2 remains fixed regardless of whether the first and second preset conditions are met. In some embodiments, the third preset value is greater than the second preset value, and the second preset value is greater than the first preset value.

[0073] In other embodiments, different preset conditions correspond to different sampling frequencies RA1 and different parameter sets. For example, when the first preset condition is met, the arithmetic circuit 430 sets the sampling frequency RA1 to a first preset value and requests the selection circuit 440 to provide parameter set PG1. When the second preset condition is met, the arithmetic circuit 430 sets the sampling frequency RA1 to a second preset value and requests the selection circuit 440 to provide parameter set PG2. When the third preset condition is met, the arithmetic circuit 430 sets the sampling frequency RA1 to a third preset value and requests the selection circuit 440 to provide parameter set PG3.

[0074] Figure 5 This is another schematic diagram of the control circuit of the present invention. The control circuit 500 includes a detection circuit 510, a sampling circuit 520, an arithmetic circuit 530, a multiplexer 540, and storage circuits 550 and 560. Since the characteristics of the arithmetic circuit 530, the multiplexer 540, and the storage circuits 550 and 560 are similar... Figure 3 The operational circuit 330, multiplexer 340, and storage circuits 350 and 360 are not described in detail here.

[0075] The detection circuit 510 includes sensors 511 to 513. Because sensors 511 and 512 have similar characteristics... Figure 3Sensors 311 and 312 are described in detail, so they will not be repeated here. In this embodiment, sensor 513 collects external information IN3 to generate a detection signal SD3. The present invention does not limit the type of sensor 513. The type of sensor 513 may be the same as or different from that of sensor 511 or 512. Since the characteristics of external information IN3 are similar to those of external information IN1, they will not be described in detail here.

[0076] Sampling circuit 520 includes secondary sampling circuits 521 to 523. Since the characteristics of sampling circuits 521 and 522 are similar... Figure 3 The secondary sampling circuits 321 and 322 are not described in detail here. In this embodiment, the secondary sampling circuit 523 samples the detection signal SD3 according to the sampling frequency RA3 to generate a sampling signal SS3. In some embodiments, the sampling signal SS3 serves as an output signal SO2. In this example, the output signal SO2 may be provided to... Figure 1 The processing circuit 120.

[0077] The arithmetic circuit 530 inputs the sampling signal SS1 into the inference model MD to generate the inference result IR, and determines whether a first preset condition is met based on the inference result IR. When the first preset condition is not met, the arithmetic circuit 530 maintains the sampling frequencies RA1 and RA3 at a first preset value through the control signal SC, and requests the multiplexer 540 to provide parameter set PG1. When the first preset condition is met, the arithmetic circuit 530 sets the sampling frequencies RA1 and RA3 to a second preset value through the control signal SC, and requests the multiplexer 540 to provide parameter set PG2. In this example, the sampling frequency RA1 is the same as the sampling frequency RA3.

[0078] In other embodiments, Figure 4 The selection circuit 440 and parameter groups PG1 to PGN can replace Figure 5 The multiplexer 540 and parameter groups PG1 and PG2. In this example, when different preset conditions are met, the sampling frequencies RA1 and RA3 are different values, while the sampling frequency RA2 remains constant.

[0079] In some embodiments, when the sampling frequencies RA1 and RA3 are at a first preset value, the sampling circuits 522 and 523 stop operating. When the first preset condition is met, the sampling frequencies RA1 and RA3 may be at a second preset value. The sampling circuits 522 and 523 sample the detection signals SD2 and SD3 according to the sampling frequencies RA1 and RA3, respectively.

[0080] Figure 6This is a flowchart illustrating the control method of the present invention. The control method of the present invention can exist through program code. When the program code is loaded and executed by a machine, the machine becomes a control circuit and microcontroller for implementing the present invention. First, a sampling frequency is set to a first preset value, and a detection signal is sampled to generate a sampling signal (step S611). In one possible embodiment, the detection signal may be a continuous signal or a discrete signal. In other embodiments, step S611 drives a sensor to detect external information to provide a detection signal. The present invention does not limit the type of external information. External information can be any type of signal, such as pulse oximetry signal, electrocardiogram signal, or electroencephalogram signal.

[0081] A sampled signal and a first set of parameters are provided to an inference model to generate an inference result (step S612). The first set of parameters has multiple parameters. In one possible embodiment, the inference model is an RNN model, such as LSTM or GRU.

[0082] Based on the inference result, determine whether the sampling frequency needs to be changed (step S613). In one possible embodiment, step S613 determines whether a preset condition is met based on the inference result. When the preset condition is not met, it means that the sampling frequency does not need to be changed. Therefore, return to step S612 and continue to provide the first parameter set to the inference model. However, when the preset condition is met, it means that the sampling frequency needs to be changed. Therefore, set the sampling frequency to a second preset value and sample the detection signal (step S614).

[0083] A sampled signal and a second set of parameters are provided to the inference model (step S615). Next, it is determined whether the sampling frequency needs to be changed again (step S616). In one possible embodiment, step S616 determines whether the sampling frequency needs to be modified again based on the inference result. If the sampling frequency needs to be modified again, the process returns to step S611, sets the sampling frequency to a first preset value, and provides the first set of parameters to the inference model (step S612). However, if the sampling frequency does not need to be modified again, the process returns to step S615, and the second set of parameters continues to be provided to the inference model.

[0084] In some embodiments, both steps S613 and S616 determine whether a preset condition is met. For step S613, when the preset condition is met, it indicates that the sampling frequency needs to be modified. Therefore, the sampling frequency is set to a second preset value, and a second parameter set is provided to the inference model. In this example, for step S616, when the preset condition is met, it indicates that the sampling frequency does not need to be modified. Therefore, the sampling frequency is maintained at the second preset value, and a second parameter set is provided to the inference model. However, in step S616, when the preset condition is not met, it indicates that the sampling frequency needs to be modified again. Therefore, the sampling frequency is set to a first preset value, and a first parameter set is provided to the inference model.

[0085] The control method, or a specific form or part thereof, of the present invention may exist in the form of program code. The program code may be stored on physical media, such as floppy disks, optical disks, hard disks, or any other machine-readable (e.g., computer-readable) storage media, or may be a computer program product, not limited to an external form. When the program code is loaded and executed by a machine, such as a computer, this machine becomes a component of the control circuitry and microcontroller of the present invention. The program code may also be transmitted via transmission media, such as wires or cables, optical fibers, or any transmission method. When the program code is received, loaded, and executed by a machine, such as a computer, this machine becomes a component of the control circuitry and microcontroller of the present invention. When implemented in a general-purpose processing unit, the program code, in conjunction with the processing unit, provides a unique device that operates similarly to an application-specific logic circuit.

[0086] While the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make modifications and refinements without departing from the spirit and scope of the invention. For example, the systems, apparatus, or methods described in the embodiments of the present invention can be implemented in physical embodiments of hardware, software, or a combination of hardware and software. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A control circuit, characterized in that, include: A detection circuit collects a first external information to generate a first detection signal; A sampling circuit has a first sampling frequency and samples the first detection signal to generate a first sampling signal; An arithmetic circuit inputs the first sampled signal into an inference model to generate an inference result, and determines whether a first preset condition is met based on the inference result. in: When the first preset condition is met: The arithmetic circuit adjusts the first sampling frequency from a first preset value to a second preset value. When the first preset condition is not met: The arithmetic circuit maintains the first sampling frequency at the first preset value.

2. The control circuit as described in claim 1, characterized in that, include: When the first sampling frequency equals the first preset value, the arithmetic circuit inputs a first set of parameters into the inference model. When the first sampling frequency is equal to the second preset value, the arithmetic circuit inputs a second set of parameters into the inference model.

3. The control circuit as described in claim 2, characterized in that, The sampling circuit samples the first detection signal according to the first sampling frequency to generate the first sampling signal.

4. The control circuit as described in claim 3, characterized in that, Including: A multiplexer receives the first parameter set and the second parameter set. in: When the first preset condition is met, the arithmetic circuit generates a control signal to the sampling circuit to adjust the first sampling frequency. The multiplexer provides the first parameter group or the second parameter group to the arithmetic circuit according to the control signal.

5. The control circuit as described in claim 4, characterized in that, When the first sampling frequency is equal to the second preset value and a second preset condition is met, the arithmetic circuit uses the control signal to request the multiplexer to provide the first parameter set and adjusts the first sampling frequency from the second preset value to the first preset value.

6. The control circuit as described in claim 2, characterized in that, The sampling circuit samples the first detection signal according to a second sampling frequency, and samples a second detection signal according to the first sampling frequency. The first sampling frequency is controlled by the arithmetic circuit, and the second sampling frequency is fixed.

7. The control circuit as described in claim 6, characterized in that, include: The detection circuit includes a first sensor and a second sensor, and the sampling circuit includes a first sampling circuit and a second sampling circuit. The first sensor collects the first external information to generate the first detection signal, and the second sensor collects the second external information to generate the second detection signal. The first sampling circuit samples the first detection signal according to the second sampling frequency, and the second sampling circuit samples the second detection signal according to the first sampling frequency.

8. A microcontroller, characterized in that, include: A detection circuit collects external information to generate a detection signal; A sampling circuit has a sampling frequency and samples the detection signal to generate a sampling signal; An arithmetic circuit inputs the sampled signal into an inference model to generate an inference result, and determines whether a first preset condition is met based on the inference result; and A processing circuit performs a preset operation based on the sampled signal. in: When the first preset condition is not met, the arithmetic circuit will input a first set of parameters into the inference model. When the first preset condition is met, the arithmetic circuit inputs a second set of parameters into the inference model and adjusts the sampling frequency.

9. The microcontroller as described in claim 8, characterized in that, include: When the first preset condition is met, the arithmetic circuit adjusts the sampling frequency from a first preset value to a second preset value. When the sampling frequency is the second preset value and a second preset condition is met, the arithmetic circuit adjusts the sampling frequency from the second preset value to the first preset value. The second preset value is greater than the first preset value.

10. A control method, characterized in that, include: Set a sampling frequency to a first preset value; Sample a detection signal to generate a sampling signal; The sampled signal and a first set of parameters are provided to an inference model to generate an inference result; Based on this conclusion, determine whether the sampling frequency needs to be changed; When the sampling frequency does not need to be changed: Provide this first set of parameters to the inference model; When the sampling frequency needs to be changed: The sampling frequency is set to a second preset value; The sampled signal and a second set of parameters are provided to the inference model. Determine whether the sampling frequency needs to be changed again. If the sampling frequency needs to be changed again, set the sampling frequency to the first preset value and provide the first parameter set to the inference model. If the sampling frequency does not need to be changed again, continue to provide the second parameter set to the inference model.