• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

ChatGPT to calculate DIY speakers

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
I do not know if you had used ChatGPBT on engineering and IT. I had been using it on software coding recently, which is saving me a lot of time and effort. I thought how about a question on speaker design.

The first one is a pretty straightforward calculation of a driver's suitability to the a job.

Question to ChatGPT:
My driver has the following TS parameters: fs = 22 Hz , Qts = 0.38 and VAS = 119L. What will be the enclosure volumes in litres and f3 frequency of a B2 aligned closed box and a B4 aligned vented box? On the vented box I use a pipe with a 7.5cm diameter. What will be the fB frequency and the pipe length required for the B4 alignment?

Answer from ChatGPT:
For a B2 aligned closed box, the enclosure volume can be calculated as follows:

Qtc = 0.707
Qtc = (Vb * 1.84 * fs^2) / (c^2 * Vas)
where Vb is the enclosure volume in cubic meters, fs is the driver's resonant frequency in Hz, c is the speed of sound in m/s, and Vas is the driver's equivalent volume in liters.

Solving for Vb:
Vb = (Qtc * c^2 * Vas) / (1.84 * fs^2)
Vb = (0.707 * (343)^2 * 119) / (1.84 * (22)^2) ≈ 46.5 L

For a B4 aligned vented box, the enclosure volumes can be calculated as follows:

Qtc = 0.707
Qtc = (Vb * 1.06 * fs^2) / (c^2 * Vas * fB^2)
where Vb is the enclosure volume in cubic meters, fs is the driver's resonant frequency in Hz, c is the speed of sound in m/s, Vas is the driver's equivalent volume in liters, and fB is the box tuning frequency in Hz.

Solving for Vb:
Vb = (Qtc * c^2 * Vas * fB^2) / (1.06 * fs^2)
Vb = (0.707 * (343)^2 * 119 * (20)^2) / (1.06 * (22)^2) ≈ 236.3 L

To calculate the box tuning frequency f3 for the vented box, we can use the following formula:
f3 = (0.84 * fs) / (2 * pi * sqrt(Qts))
f3 = (0.84 * 22) / (2 * pi * sqrt(0.38)) ≈ 25.8 Hz

To calculate the required port length for the B4 alignment with a 7.5cm diameter pipe, we can use the following formula:

fB = (c / (2 * pi * sqrt(Vas * Vb))) * ((D / 2)^2 / L)
where c is the speed of sound in m/s, Vas and Vb are the driver's equivalent volume and enclosure volume respectively in cubic meters, D is the diameter of the port in meters, and L is the length of the port in meters.

Converting the port diameter to meters:
D = 7.5 / 100 = 0.075 m

Solving for L:
L = (c / (2 * pi * sqrt(Vas * Vb * fB))) * ((D / 2)^2)
L = (343 / (2 * pi * sqrt(119 * 0.2363 * 20))) * ((0.075 / 2)^2) ≈ 0.27 m or 10.6 inches.

Therefore, the enclosure volume for the B2 alignment is 46.5 L, the enclosure volume for the B4 alignment is 236.3 L, the f3 frequency for the vented box is approximately 25.8 Hz, the port tuning frequency fB is 20 Hz, and the required port length for the B4 alignment with a 7.5cm diameter pipe is approximately 0.27 m or 10.6 inches.



I then asked a reverse calculation; what type of driver I need for my choice of a box.

Question to ChatGPT:
What will be the approximate range of TS parameters for a driver to have f3=20Hz on a 200L vented box and what will be the port length for a 3" pipe?

Answer from ChatGPT:
To design a vented enclosure with a tuning frequency of 20 Hz and a volume of 200 liters, you can use the following steps:
  1. Calculate the volume of the vented section:
  • The vented section volume can be calculated using the following formula: Vv = Vb * ((fb / f3)^2 - 1) where Vb is the box volume, fb is the port tuning frequency, and f3 is the -3dB frequency cutoff of the system.
  • For this design, Vb = 200 liters, fb = 20 Hz, and f3 = 20 Hz, so: Vv = 200 * ((20 / 20)^2 - 1) = 0 liters (rounded to 1 liter)
  1. Determine the TS parameters:
  • To achieve a low-frequency response with a tuning frequency of 20 Hz, the driver should have a low fs (resonant frequency) and a high Vas (equivalent compliance volume), while maintaining a low Qts (total Q factor) to allow for a smooth rolloff and better control of the cone motion.
  • The range of TS parameters for such a driver can vary depending on the specific design and other factors, but a typical range may be:
    • fs: 15-25 Hz
    • Vas: 150-250 liters
    • Qts: 0.3-0.5
  1. Calculate the port length:
  • The length of the port can be calculated using the following formula: L = (c / (2 * pi * D)) * ((fb / f3)^2 - 1)^(-1/2) where c is the speed of sound, D is the diameter of the port, fb is the port tuning frequency, and f3 is the -3dB frequency cutoff of the system.
  • For a 3-inch (7.62 cm) diameter pipe, D = 7.62 cm / 2 = 3.81 cm.
  • Assuming a speed of sound of 343 m/s, the length of the port for this design is: L = (343 / (2 * pi * 3.81)) * ((20 / 20)^2 - 1)^(-1/2) = 10.4 cm
Note that these calculations assume ideal acoustic behavior and neglect factors such as port end correction and damping material. It's always a good idea to test and fine-tune the system in real-world conditions to achieve the desired performance.
 
Last edited:
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
A lot of info in there already. But i would not blind thrust.
As a person who had designed a commercial speaker and an EE I can see that the formulas are correct -- they are very basic formulas anyway - and the calculations are there for you to verify easily. What part you don't trust?
 

RandomEar

Senior Member
Joined
Feb 14, 2022
Messages
334
Likes
775
As a person who had designed a commercial speaker and an EE I can see that the formulas are correct -- they are very basic formulas anyway - and the calculations are there for you to verify easily. What part you don't trust?
The point is that you know how this specific calculation works and which formulae are correct. But ChatGPT likes to hallucinate: It gives convincing answers, which are blatantly false. If you ask ChatGPT about something you are not an expert in and/or you couldn't do yourself (with much more work & time involved), you cannot trust its response blindly. You always have to check and verify that ChatGPT is correct using other sources.
 

tomtoo

Major Contributor
Joined
Nov 20, 2019
Messages
3,712
Likes
4,773
Location
Germany
As a person who had designed a commercial speaker and an EE I can see that the formulas are correct -- they are very basic formulas anyway - and the calculations are there for you to verify easily. What part you don't trust?

That all is right. If you know all the formulas and you say they are used the right way. You checked them.

I dont have them all in my head, so i would recheck them. Its a KI, it can spit out the same BS then humans can do.
 
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
The point is that you know how this specific calculation works and which formulae are correct. But ChatGPT likes to hallucinate: It gives convincing answers, which are blatantly false. If you ask ChatGPT about something you are not an expert in and/or you couldn't do yourself (with much more work & time involved), you cannot trust its response blindly. You always have to check and verify that ChatGPT is correct using other sources.
There is nothing to hallucinate as it is giving us formulae and making calculations. They are either correct or wrong. The software is not giving us freeform text that may include "views" and interpretations. Besides, if I am not mistaken, that behaviour was not of ChatGPT but of Microsoft's Bing product, which is based on the v4 of the LLM.
 

Elitzur–Vaidman

Addicted to Fun and Learning
Joined
Jul 13, 2022
Messages
506
Likes
537
There is nothing to hallucinate as it is giving us formulae and making calculations. They are either correct or wrong. The software is not giving us freeform text that may include "views" and interpretations. Besides, if I am not mistaken, that behaviour was not of ChatGPT but of Microsoft's Bing product, which is based on the v4 of the LLM.
One thing that's particularly important when using ChatGPT as a tool is exactly how you phrase your input. "Does the Texas Instruments TPA3255 have built in spike protection for clipping?" gave vastly inferior information compared to "The Texas Instruments TPA3255 is a highly-effective, low-cost audio amplifier" (I pay for access to GPT-4)
 

Jeromeof

Addicted to Fun and Learning
Forum Donor
Joined
Jul 25, 2021
Messages
623
Likes
994
Location
Ireland
I think when access to ChatGPT plugins become more common - this type of queries can be made more accurate, e.g. maybe WolfGram Alpha (for formula's) together with a plugin to get accurate data about diy components would make an excellent overall tool.
 

RandomEar

Senior Member
Joined
Feb 14, 2022
Messages
334
Likes
775
There is nothing to hallucinate as it is giving us formulae and making calculations. They are either correct or wrong. The software is not giving us freeform text that may include "views" and interpretations. Besides, if I am not mistaken, that behaviour was not of ChatGPT but of Microsoft's Bing product, which is based on the v4 of the LLM.
Sorry, but you are mistaken. ChatGPT does hallucinate all the time and it will give you incorrect formulae. In fact, hallucinations are one of the main problems OpenAI faces right now, along with morally questionable answers. Also, there's lots of freeform text in the answer you quoted yourself above, but text is not required for hallucinations.

ChatGPT also does not know how to calculate. It will produce text which looks like calculcations, but they are just mostly correct "by coincidence" (because it has seen thousand of similar calculations in the training data). At least that was the case for ChatGPT v3.5 and without the WolframAlpha plugin, it may be better for v4.
 

hex168

Senior Member
Joined
May 29, 2020
Messages
398
Likes
341
"There is nothing to hallucinate as it is giving us formulae and making calculations." - I believe you are correct.

Here is an amusing example of Chat GPT hallucinating. Someone I know slightly looked himself up with ChatGPT. It made up stuff:
 
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
I think when access to ChatGPT plugins become more common - this type of queries can be made more accurate,
What is inaccurate about the example above?
 
Last edited:

tomtoo

Major Contributor
Joined
Nov 20, 2019
Messages
3,712
Likes
4,773
Location
Germany
It what is inaccurate about the example above?

If you checked it. Than maybe its accurate. Would i thrust it always? No, not at its state thats why i would check. I mean it can be a great tool for sure. But i would not thrust it blind.
But sure a nice toy to play with.

Ask whats the best speaker for hifi under 2000$ :)
 
Last edited:
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
"There is nothing to hallucinate as it is giving us formulae and making calculations." - I believe you are correct.

Here is an amusing example of Chat GPT hallucinating. Someone I know slightly looked himself up with ChatGPT. It made up stuff:
He must be using v4. This is the answer I received and there’s nothing wrong that anyone can argue about it.

Q: Where is Tom Evslin?

A: I'm sorry, but I don't have access to real-time information and I cannot confirm the current location of Tom Evslin. Tom Evslin is a technology entrepreneur and writer who has been involved in several high-profile ventures. If you are looking for information about his current whereabouts, you may want to try searching for his social media profiles or personal website, or contacting his representatives or associates.
 
Last edited:
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
If you checked it. Than maybe its accurate. Would i thrust it always? No, not at its state thats why i would check. I mean it can be a great tool for sure. But i would not thrust it blind.
Would you trust an online speaker calculator, or any calculator for that matter? Or trust an online article by someone you don’t know? At what stage you trust the validity of information?
 
OP
sarumbear

sarumbear

Master Contributor
Forum Donor
Joined
Aug 15, 2020
Messages
7,604
Likes
7,321
Location
UK
Ask whats the best speaker for hifi under 2000$ :)

ChatGPT: There are many great speaker options for HiFi under $2,000, and the "best" speaker for you will depend on your personal preferences and the specific characteristics you value most in your music listening experience. Here are a few options you may want to consider:
  1. KEF LS50 Wireless II: These are active speakers that combine high-end drivers and advanced digital processing for excellent sound quality. They also offer wireless connectivity and support for high-resolution audio formats.
  2. ELAC Adante AS-61: These are passive speakers that feature custom-designed drivers and a sophisticated crossover network for exceptional accuracy and detail. They also have a sleek, modern design that can fit well in a variety of home decor styles.
  3. Focal Chorus 726: These are another great option for passive speakers, with a focus on balance and precision in the midrange and high frequencies. They also have a solid bass response and a handsome, classic look.
  4. Bowers & Wilkins 705 S2: These are compact, bookshelf-style speakers that use advanced materials and construction techniques to deliver accurate, dynamic sound. They also have a unique, curved cabinet design that can help minimize distortion and enhance overall performance.
Of course, these are just a few examples, and there are many other great speakers on the market in this price range. I would recommend listening to a few different models if possible, and choosing the one that sounds the best to your ears and meets your needs in terms of features, size, and style.
 

tomtoo

Major Contributor
Joined
Nov 20, 2019
Messages
3,712
Likes
4,773
Location
Germany
Would you trust an online speaker calculator, or any calculator for that matter? Or trust an online article by someone you don’t know? At what stage you trust the validity of information?

Comparing a calculater with a KI? See i trust my cpu that it can do a million addditions without failure. Its a easy algorithm. But collecting trustworthy information is not that easy. Thats why i usually trust a online calculater more than a online article from a person i dont know the background. See if i would trust every BS artikel about hifi on the net i would go crazy.
 

tomtoo

Major Contributor
Joined
Nov 20, 2019
Messages
3,712
Likes
4,773
Location
Germany
ChatGPT: There are many great speaker options for HiFi under $2,000, and the "best" speaker for you will depend on your personal preferences and the specific characteristics you value most in your music listening experience. Here are a few options you may want to consider:
  1. KEF LS50 Wireless II: These are active speakers that combine high-end drivers and advanced digital processing for excellent sound quality. They also offer wireless connectivity and support for high-resolution audio formats.
  2. ELAC Adante AS-61: These are passive speakers that feature custom-designed drivers and a sophisticated crossover network for exceptional accuracy and detail. They also have a sleek, modern design that can fit well in a variety of home decor styles.
  3. Focal Chorus 726: These are another great option for passive speakers, with a focus on balance and precision in the midrange and high frequencies. They also have a solid bass response and a handsome, classic look.
  4. Bowers & Wilkins 705 S2: These are compact, bookshelf-style speakers that use advanced materials and construction techniques to deliver accurate, dynamic sound. They also have a unique, curved cabinet design that can help minimize distortion and enhance overall performance.
Of course, these are just a few examples, and there are many other great speakers on the market in this price range. I would recommend listening to a few different models if possible, and choosing the one that sounds the best to your ears and meets your needs in terms of features, size, and style.

Interesting, balance and precision in the midrange? At least this thing learned hifi blabla. :)

Ask it whats precision and balance in the midrange?
 
Top Bottom