I'm trying to model the ultrasonic sensor for a simulation and I need to somehow express in what angles and distances the object will be detected by the sensor.
What does sensitivity mean? It is set in dB values. I thought it is the amount of attenuation at which the sensor can still detect the object, but that would mean the lower number, the better, and the picture below shows that for the chosen frequency 40 kHz the sensitivity is around -75 dB, while other frequencies go to -95 dB. So what does this property mean and how should I understand the graph?
Another thing I can't figure out is the radiation graph (or directivity graph, if they are the same. They look the same, so I have no idea.) Examples of those graphs are shown below.
What does the line represent? I'm thinking it's some kind of contour connecting the distances in all the angles which has something same. Maybe the attenuation or the Sound Pressure Level. But those graphs never state any specific value related to the line.
From what I read I think that the Sound Pressure Level (SPL) in R0 distance is measured at angle 0 (directly ahead of the sensor) at 30 cm distance and I can compute the SPL in any other distance R at 0 angle using the formula
\$SPL(R) = SPL(R0) -20 \log(R/R0) - \alpha R \$
where \$\alpha\$ is the attenuation. Now this SPL is in dB, so I thought I could directly compare it to the sensitivity and get the result. If \$SPL > \text{sensitivity}\$ then the sensor can detect the object. But that's probably totally wrong.
So how can I compute that?
EDIT
The example datasheet here
EDIT
So to sum the information up, I have learned, that the sensor datasheet should provide:
- SPL (Sound Pressure Level, usually measured at \$30\, cm\$ at the angle 0°, where reference is \$ 20\, \mu Pa\$ which is the lowest sound pressure a human might hear)
- Sensitivity (at \$30\, cm\$ at the angle 0°, where reference is either \$1\, V\$ or \$10\, V\$)
- Directivity graph of the radiation
- Directivity graph of the sensitivity
There is an example of those information taken from the datasheet provided by @Andyakka.
The SPL and Sensitivity:
And the graphs:
The relation between \$SPL\$ in \$dB\$ and pressure \$p\$ in \$Pa\$ is \$ SPL = 20\log(\frac{p}{p_{ref}})\$, where \$p_{ref} = 20\, \mu Pa\$
The \$SPL(r_0,\theta_0)\$ at \$30\, cm\$ right in front of the sensor (\$r_0=0.30\, m\$, \$ \theta_0=0°\$) is \$120\, dB\$, that means \$ p(r_0,\theta_0)= p_{ref}\cdot10^{\frac{SPL(r_0,\theta_0)}{20}}=20\,Pa\$
If I want the pressure at angle \$0°\$ in any other distance \$r\$, I compute it with following formula:
\$ SPL(r,0°) = SPL(r_0,0°)-20\log(\frac{r}{r_0})-\alpha r \$,
where \$\alpha\$ is the attenuation of the wave and can be approximated by formula
- for frequencies \$f<50\,kHz\$: \$\alpha = 0.01f\$
- for frequencies \$50\,kHz<f<300\,kHz\$: \$\alpha = 0.022f-0.6\$
If I want to know the \$SPL\$ at \$30\,cm\$ in any other angle, I look at the graph. I can see the \$SPL\$ decreases by about
- \$4\,dB\$ at angle of \$30°\,\$
- \$6\,dB\$ at angle of \$45°\,\$
- \$11\,dB\$ at angle of \$60°\,\$
Since the \$SPL\$ is already in \$dB\$, I can simply subtract the value from the \$SPL(r_0,\theta_0)\$ and I get
- \$SPL(r_0,30°)\,= 116\, dB\$ : \$p(r_0,30°)=12.6\, Pa\$
- \$SPL(r_0,45°)\,= 114\, dB\$ : \$p(r_0,45°)=10\, Pa\$
- \$SPL(r_0,60°)\,= 109\, dB\$ : \$p(r_0,60°)=5.6\, Pa\$
Then I can use the same formula as shown above to compute the SPL at any other distance.
\$ SPL(r,\theta) = SPL(r_0,\theta)-20\log(\frac{r}{r_0})-\alpha r \$,
Now I would need to compute the wave that gets reflected from an object at certain place depending on the object's size and surface. If I knew at which angle and with which pressure a wave gets back to the sensor, I could use the sensitivity graph to compute the voltage produced by the sensor.
The relationship between sensitivity value \$s\$ in \$dBV\$ and voltage value \$u\$ in \$V\$ is \$ s=20\log(\frac{u}{u_{ref}}) \$, where the \$u_{ref}\$ is in this case \$10 V\$.
So the voltage \$u\$ related to the sensitivity of \$-63\, dB\$ is \$u = u_{ref}\cdot 10^{\frac{s}{20}}=10\cdot 10^{-\frac{63}{20}} = 7.1\, mV\$
So if the sound wave travels into the sensor from angle \$0°\$ and at distance \$30\, cm\$ has a pressure of \$20\,Pa\$, the sensor produces a voltage of \$7.1\, mV\$.
If I use simple linear relationship, that would imply that for sound wave which has at the distance of \$30\, cm\$ pressure \$1\, Pa\$ at angle \$0°\$ would induce the sensor output of \$355\,\mu V\$
For the sensitivity in other directions I can read from graph, that the sensitivity decreases by about
- \$5\,dB\$ at angle of \$30°\,\$
- \$9\,dB\$ at angle of \$45°\,\$
- \$14\,dB\$ at angle of \$60°\,\$
Than means
- \$ s(r_0,30°)=-68\, dB\$ : \$u(r_0,30°)=4\, mV\$ for wave of pressure \$116\, dB\$
- \$ s(r_0,45°)=-72\, dB\$ : \$u(r_0,45°)=2.5\, mV\$ for wave of pressure \$114\, dB\$
- \$ s(r_0,60°)=-77\, dB\$ : \$u(r_0,60°)=1.4\, mV\$ for wave of pressure \$109\, dB\$
If I know the pressure of the wave at any other distance, I use the formula shown earlier to compute respective SPL at 30 cm and from there I compute the actual sensor output.
\$ SPL(r_0,\theta) = SPL(r,\theta)-20\log(\frac{r_0}{r})-\alpha r_0 \$,
Please somebody confirm or provide explanation of the error. Thank you!