Sensor device and method for operating a sensor device
By introducing processing units and communication interfaces into the sensor device, allowing the reception and processing of the desired sampling frequency and measurement duration, the inaccuracy problem of the sensor device in sampling frequency selection is solved, and flexible sampling frequency selection and data processing is realized. Convenience.
Patent Information
- Application Number
- CN202411074929.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-07
- Filing Date
- 2024-08-07
- Publication Date
- 2025-02-14
AI Technical Summary
Existing sensor devices have inaccurate problems when selecting sampling frequency, resulting in increased energy demand and inconvenient data processing, especially when combined with data from other sensor devices.
A sensor device is designed with a sensor element, a processing unit and a communication interface. The processing unit is able to receive the desired sampling frequency and measurement duration and determine the necessary time spacing between two successive measurements based on these parameters, thereby achieving flexible sampling frequency selection.
The free selection of sampling frequency is achieved, ensuring that the sensor device operates at the required frequency, simplifying data processing, optimizing energy requirements, and reducing the risk of data aliasing.
Smart Images

Figure CN119437303A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a sensor device having a sensor element, a processing unit and a communication interface. The invention also relates to a method for operating a sensor device, in particular a sensor device according to the invention. Background Art
[0002] The sensor device measures a physical variable, for example acceleration, pressure or temperature, by sampling a corresponding measurement signal of a sensor element of the sensor device.
[0003] Typically, in such sensor devices, the sampling frequency can be configured by selecting from a set of predefined sampling frequencies, which are implemented, for example, as a lookup table. As a user, one selects the sampling frequency one needs from the available sampling frequencies. If the exact sampling frequency is not available, the closest higher sampling frequency is usually selected. Sampling frequency. However, depending on the number of available sampling frequencies, the distance between two sampling frequencies can be large. Since the current consumption of the sensor device is typically dependent on the sampling frequency, large deviations of the required sampling frequency from the set sampling frequency are associated with an undesirably increased energy requirement.
[0004] If the sensor data are to be combined with data from other sensor devices that are sampled at a different frequency, an unideally adapted sampling frequency may also have a negative impact on the further processing of the sensor data. In addition, aliasing may occur if the sampling frequency of the sensor device and the search frequency of the user do not match.
[0005] The aforementioned problems in the prior art are to be solved by means of the present invention. Summary of the invention
[0006] The present invention relates to a sensor device, which has a sensor element, a processing unit and a communication interface, wherein the processing unit is configured to receive a desired sampling frequency and a desired measurement duration via the communication interface, determine the required time interval between two consecutive measurements based on the desired sampling frequency and the desired measurement duration, and sample a measurement signal of the sensor element based on the required time interval between two consecutive measurements.
[0007] The advantage here is that a free selection of the sampling frequency is possible. This allows the use of exactly the frequency required by the application or desired by the user. On the one hand, this has the advantage that the sensor device and further sensor devices can be operated at the same frequency, which significantly facilitates further processing of the data. In addition, the energy requirement is optimized, since the sensor device does not need to receive more sensor data than is required.
[0008] In this case, the sensor device can have, for example, a sensor element which is designed as a MEMS component. However, the sensor element can also be another type of component.
[0009] The sensor element can be configured, for example, as an acceleration sensor, a pressure sensor or a temperature sensor and can accordingly output an acceleration signal, a pressure signal or a temperature signal as a measurement signal. Accordingly, the measurement signal can be sampled by the processing unit, wherein sampling is understood to mean the detection of measurement values by corresponding measurements at discrete, usually equidistant time points. In particular, an AD converter can be used, for example, when sampling the measurement signal.
[0010] The processing unit can be designed, for example, as a computing unit, in particular as a microcontroller.
[0011] The communication interface can be configured in such a way that data can be received from an external unit relative to the sensor device. In this case, the data reception can be wired. However, in addition or as an alternative, the data reception can also function wirelessly. The external unit can be configured, for example, as a control device or another sensor device, which can be operated accordingly by a user of the sensor device in order to transmit the desired sampling frequency and the desired measurement duration to the sensor device. In addition, the processing unit can also be configured to transmit the sampled measurement signal to the user or another external unit by means of the communication interface.
[0012] In this case, the sampling frequency is to be understood as the frequency with which the measurement signal is sampled for each time interval. In this case, the desired sampling frequency can be predetermined externally and is typically given in Hz.
[0013] The measurement duration is understood to be the time interval during which the measurement process lasts for each sampling.
[0014] The time interval between the end of a measurement and the start of the subsequent measurement is to be understood as the necessary time interval, wherein the time interval takes into account the desired sampling frequency and the desired measurement duration. Here, the time interval can be given as a cycle of a clock signal.
[0015] One embodiment of the invention provides that the processing unit is designed to determine the necessary time interval between two consecutive measurements as the difference between the inverse of the desired sampling frequency and the desired measurement duration.
[0016] The advantage here is that this constitutes a simple possibility of determining the necessary time interval between two consecutive measurements. In this case, the corresponding determination can be carried out in a resource-saving and fast manner.
[0017] The reciprocal of the sampling frequency is to be understood as the period duration of the sampling, wherein the period duration is to be understood as the time interval between the end of a measurement and the end of the following measurement. The period duration thus constitutes the required time interval, by which the results of successive measurements need to be spaced apart from one another in order to meet the desired sampling frequency. Ideally, the period duration and the measurement duration are given in the number of clock pulses of the clock signal.
[0018] Since the cycle duration has a fixed relationship with the desired sampling frequency, the cycle duration does not necessarily have to be calculated, but can be stored, for example, in a table in a memory unit, wherein each possible value of the sampling frequency is assigned an associated value for the cycle duration in the lookup table and can thus be directly retrieved without calculation. However, if the sensor device has a sufficiently powerful processing unit, implementation as a calculation is advantageous, since the calculation requires significantly less silicon area in terms of technical realization than a corresponding lookup table.
[0019] In particular, in the case of a constant measurement duration, the necessary time interval between two consecutive measurements can also be determined by means of a lookup table. Alternatively, however, calculations are again conceivable and are correspondingly advantageous in terms of the silicon area required for technical implementation.
[0020] One embodiment of the invention provides that the sensor device has a memory unit, wherein the processing unit is designed to store a desired sampling frequency received via the communication interface and / or a desired measurement duration received via the communication interface in the memory unit and to read them out from the memory unit.
[0021] The advantage here is that the information received via the communication interface can be stored and used at any later time if necessary. This enables simple, safe and fast processing with the corresponding information.
[0022] Here, the memory unit can be integrated in the processing unit or configured as an independent structural element. The memory unit can, for example, have a storage area of n binary digits, into which the desired sampling frequency can be written by means of the processing unit, wherein n is a natural number. For example, the sampling frequency can be a number in the range of 1 to 2^n Herz, wherein n is again a natural number. Similarly, the sampling frequency can be a rational number, which is represented by a fixed-point number (Fixkommazahl) in the storage area. Thus, for example, in the case of 4 decimal places, a sampling frequency in the range of 2^-4 to 2^(n-4]Hz can be represented. Alternatively, the storage area can also be switchable, so that a selection can be made between multiple formats, and therefore a wide range of sampling frequencies can be covered in the case of a small number of binary digits n.
[0023] Furthermore, the invention relates to a method for operating a sensor device, in particular a sensor device according to the invention, which method has the following method steps:
[0024] a. receiving a desired sampling frequency via a communication interface of the sensor device,
[0025] b. receiving via the communication interface a desired measurement duration,
[0026] c. Determine the necessary time interval between two consecutive measurements according to the desired sampling frequency and the desired measurement duration,
[0027] d. Sampling the measurement signal of the sensor element of the sensor device according to the required time interval between two consecutive measurements.
[0028] The advantage here is that the sampling frequency can be freely selected. This allows the use of exactly the frequency required for the application. On the one hand, this has the advantage that all sensor devices can be operated at the same frequency, which significantly facilitates the further processing of the data. In addition, the energy requirement is optimized because the sensors do not need to receive more data than is required.
[0029] According to a further embodiment of the invention, it is provided that in method step c, the required time interval between two consecutive measurements is determined as the difference between the inverse of the desired sampling frequency and the desired measurement duration.
[0030] The advantage here is that this constitutes a simple possibility of determining the necessary time interval between two consecutive measurements. In this case, the corresponding determination can be carried out in a resource-saving and fast manner.
[0031] According to another configuration of the present invention, in method step a, the desired sampling frequency received by means of the communication interface and / or in method step b, the desired measurement duration received by means of the communication interface is stored in a memory unit of the sensor device, and in method step c, the desired sampling frequency and / or the desired measurement duration is read out from the memory unit.
[0032] The advantage here is that the information received via the communication interface can be stored and used at any later time if necessary. This enables simple, safe and fast processing with the corresponding information. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 An embodiment of a sensor device according to the invention is shown.
[0034] Figure 2 A method according to the invention for operating a sensor device is shown.
[0035] Figure 3 The time profile of a sampling process of a measurement signal of a sensor element of a sensor device is shown. DETAILED DESCRIPTION
[0036] Figure 1 An exemplary embodiment of a sensor device according to the invention is shown in a schematic illustration.
[0037] A sensor device 100 is shown. The sensor device 100 has a sensor element 10 , a processing unit 20 and a communication interface 30 .
[0038] In this case, the processing unit 20 is configured to receive a desired sampling frequency f via the communication interface 30 . a and the desired measurement duration T m .
[0039] Furthermore, the processing unit 20 is configured to, according to the desired sampling frequency f a and the desired measurement duration T m The necessary time interval ΔT between two consecutive measurements is determined. In this case, the processing unit 20 is configured to determine the necessary time interval ΔT between two consecutive measurements as the desired sampling frequency f a The inverse of the expected measurement duration T m The difference between.
[0040] Furthermore, processing unit 20 is designed to sample measurement signal 12 of sensor element 10 in accordance with the required time interval ΔT between two consecutive measurements.
[0041] Furthermore, the sensor device 100 may have a memory unit 40. In this case, the processing unit 20 may be configured to convert the desired sampling frequency f received via the communication interface 30 into a desired sampling frequency f. a and / or the desired measurement duration T received via the communication interface 30 m Stored in the memory unit 40, and read out from the memory unit 40.
[0042] Furthermore, the processing unit 20 may be designed to output measurement results of the samples of the measurement signal 12 by means of the communication interface 30 .
[0043] Figure 2 A method according to the invention for operating a sensor device is shown.
[0044] In this case, in method step a, a desired sampling frequency f is received via communication interface 30 of sensor device 100 . a Furthermore, in method step b, a desired measurement duration T is received via the communication interface. m Method steps a and b can be executed in sequence or in parallel as desired. In method step a, the desired sampling frequency f received by means of the communication interface 30 is converted into a and / or the desired measurement duration T received via the communication interface in method step b. m The desired sampling frequency f is stored in the memory unit 40 of the sensor device 100 and in method step c. a and / or the desired measurement duration T m Read from memory cell 40.
[0045] Next, in method step c, according to the desired sampling frequency f a and the desired measurement duration T m The required time interval ΔT between two consecutive measurements is determined, the desired sampling frequency and the desired measurement duration being received in method step a or in method step b. In this case, in method step c, the required time interval ΔT between two consecutive measurements can be determined as the desired sampling frequency f a The inverse of the expected measurement duration T m In addition, in method step c, the desired sampling frequency f a and / or the desired measurement duration T m Read from memory cell 40.
[0046] Furthermore, in method step d, measurement signal 12 of sensor element 10 of sensor device 100 is sampled according to the required time interval ΔT between two consecutive measurements determined in method step c.
[0047] Figure 3 The time profile of a sampling process of a measurement signal of a sensor element of a sensor device is shown.
[0048] A sampling process over time is shown in which the measurement signal 12 is sampled in three consecutive measurements. Each of the measurements has a desired measurement duration T m The time interval between the end of one measurement and the start of the following measurement is called the required time interval ΔT. Accordingly, the required time interval ΔT needs to be correctly selected so that the desired measurement duration T can be taken into account. m To achieve the desired sampling frequency f a In addition, the time interval between the end of one measurement and the end of the subsequent measurement is called the cycle duration T, which is the desired sampling frequency f a The reciprocal of .
[0049] Therefore, at the desired measurement duration T m After the measurement is completed, the required time interval ΔT is waited, and then the next measurement of the measurement signal 12 with the desired measurement duration T is started. m The measurement or sampling is then continued accordingly. The desired sampling frequency f can thus be achieved. a .
Claims
1. A sensor device (100), comprising a sensor element (10), a processing unit (20) and a communication interface (30), wherein: The processing unit (20) is configured to receive a desired sampling frequency (f a ) and the desired measurement duration (T m ), and according to the desired sampling frequency (f a ) and the desired measurement duration (T m ) determines a necessary time interval (ΔT) between two consecutive measurements and samples a measurement signal (12) of the sensor element (10) according to the necessary time interval (ΔT) between two consecutive measurements.
2. The sensor device (100) according to claim 1, characterized in that The processing unit (20) is designed to determine the required time interval (ΔT) between two consecutive measurements as the desired sampling frequency (f a ) and the expected measurement duration (T m ) 3. The sensor device (100) according to any one of the preceding claims, characterized in that The sensor device (100) has a memory unit (40), wherein the processing unit (20) is configured to store a desired sampling frequency (f a ) and / or a desired measurement duration (T m ) is stored in the memory unit (40) and read out from the memory unit (40).
4. A method for operating a sensor device, in particular a sensor device (100) according to any one of the preceding claims, comprising the following method steps: a. Receiving a desired sampling frequency (f via the communication interface (30) of the sensor device (100) a ), b. Receiving the desired measurement duration (T) via the communication interface (30) m ), c. According to the desired sampling frequency (f a ) and the desired measurement duration (T m ) determines the necessary time interval (ΔT) between two consecutive measurements, d. Sampling the measurement signal (12) of the sensor element (10) of the sensor device (100) according to the required time interval (ΔT) between two consecutive measurements.
5. The method according to claim 4, characterized in that In method step c, the required time interval (ΔT) between two consecutive measurements is determined as the desired sampling frequency (f a ) and the expected measurement duration (T m ) 6. The method according to claim 4 or 5, characterized in that: In method step a, the desired sampling frequency (f a ) and / or the desired measurement duration (T m ) is stored in a memory unit (40) of the sensor device (100), and in method step c the desired sampling frequency (f a ) and / or the desired measurement duration (T m ) is read out from the memory unit (40).