1 Introduction

Due to material limitations, it’s difficult to directly achieve lasers for all wavelength ranges. However, we can indirectly extend the laser’s spectrum into the infrared, visible light and ultraviolet ranges using frequency conversion technology. The frequency conversion techniques include second harmonic generation (SHG), third harmonic generation (THG), sum frequency generation (SFG), difference frequency generation (DFG), optical parametric oscillator (OPO), optical parametric amplification (OPA) [1,2,3,4,5], etc. The realization of these three-wave interactions needs to satisfy the conservations of momentum and energy, commonly referred to as the phase-matching conditions. Nonlinear optical crystals commonly used for frequency conversion include KH2PO4 (KDP), β-BaB2O4 (BBO), KTiOPO4 (KTP), LiB3O5 (LBO), etc. The critical phase matching calculation for uniaxial crystals is simple due to the rotational symmetry of their refractive index ellipsoid. However, the critical phase matching in biaxial crystals is more complex and challenging because their refractive index surface forms a two-sheeted structure, with three principal axes having unequal refractive indices [6, 7]. Therefore, it is particularly important to study the calculations of critical phase matching of biaxial crystals.

Since the 1960s, several researchers have carried out studies on frequency conversions and phase matching calculations for biaxial crystals [5, 8,9,10,11,12,13,14,15,16,17]. In 1967, Hobden et al. calculated the collinear SHG phase matching curves for biaxial crystals, for the first time, classified phase matching types into 14 categories [5]. In 1984, Yao et al. calculated the phase matching angle and effective nonlinear coefficient of the biaxial crystal KTP collinear SHG to find the optimal phase matching angle [9]. In 2001, Liu et al. derived analytical expressions for the phase matching of noncollinear OPA in the principal planes of biaxial crystals [11]. These researches above focused on collinear and principal planes noncollinear phase matching. The noncollinear phase matching outside the principal planes of biaxial crystals is difficult to obtain because there is no analytical expression for the refractive index. In 2000, Boeuf et al. investigated the noncollinear phase matching of parametric down conversion in uniaxial and biaxial crystal outside the principal planes [12]. However, only the phase matching for uniaxial crystals was calculated, not for biaxial crystals. In 2022, Buryy et al. optimized the local conversion efficiency for each fixed second harmonic direction but did not calculate the complete phase matching distribution, with noncollinear SHG outside the principal planes by the extreme surface method [17]. However, none of the above researches had solved the problem of noncollinear phase matching of biaxial crystals in arbitrary directions. Hobden et al. and Yao et al. calculated only the collinear phase matching, then, Liu et al. calculated only the OPA noncollinear phase matching in the principal planes. Boeuf et al. attempted to calculate the phase-matching angles in the non-principal plane, however, his approach required specifying seven variables in the process of parametric down conversion, resulting in limited degrees of freedom and an inability to obtain more combinations of phase matching. Moreover, Buryy et al. searched for the maximum conversion efficiency at each fixed second harmonic direction by varying the directions of two fundamental waves and could not solve for all possible combinations of phase matching.

In this paper, we present a novel method based on gradient descent (GD) algorithm for arbitrary directions critical phase matching. Our method addresses the challenging calculation of the phase matching for biaxial crystals, encompassing collinear out of the principal plane, noncollinear in the principal plane and especially noncollinear out of the principal plane. According to the three-wave phase matching and coplanar conditions, a system of nonlinear equations with six equations in six variables can be obtained when the frequency relationship is known. Our method is consistent with analytical and exhaustive search methods for the phase matching of collinear and noncollinear in the principal planes. Our gradient descent method and the general analytical and exhaustive search methods all utilize the Python program (PyCharm, V2023.1.4). This method has profound significance as it can be applied to solving phase matching in any three-wave interactions process and arbitrary directions, yielding more possible three-wave combination geometries. In the case of 1053 nm THG in LBO crystal which has a significant application in inertial confinement fusion (ICF) and laser fast ignition [18, 19]. The remainder of the paper is organized as follows. Section 2 introduces the model of arbitrary directions phase matching calculation based on the GD algorithm. Section 3 presents the calculation results of the phase matching angles and effective nonlinear coefficients in arbitrary directions, taking 1053 nm THG in LBO biaxial crystal for example. Section 4 draws the conclusion of this paper.

2 Phase matching model and GD algorithm

2.1 Arbitrary direction phase matching conditions

The three-wave interactions process must satisfy the phase matching conditions: energy conservation and momentum conservation [20, 21].

$$\left\{ {\begin{array}{*{20}c} {\omega_{3} = \omega_{1} + \omega_{2} } \\ {\mathop{k}\limits^{\rightharpoonup} _{3} = \mathop{k}\limits^{\rightharpoonup} _{1} + \mathop{k}\limits^{\rightharpoonup} _{2} } \\ \end{array} } \right.,$$
(1)

where \(\mathop{k}\limits^{\rightharpoonup} _{i}\)(i = 1, 2, 3) denotes the wave vector, \(k_{i} = (\omega_{i} n_{i} )/c\) denotes the wave number,\(\omega_{i}\) denotes the angular frequency,\(n_{i}\) denotes the refractive index and c is the speed of light in vacuum. For biaxial crystals, the refractive index \(n_{i} (\theta_{i} ,\varphi_{i} )\) of wave vector \(\mathop{k}\limits^{\rightharpoonup} _{i}\) is related to both the polarization \((\theta_{i} )\) and azimuth \((\varphi_{i} )\) angles in the spherical coordinate system. As shown in Fig. 1, the wave vector of three-wave noncollinear phase matching in arbitrary directions or non-principal planes. We define \(\theta_{1} < \theta_{3} < \theta_{2}\) as the near-axis structure and \(\theta_{2} < \theta_{3} < \theta_{1}\) as the off-axis structure (if in the same θ plane, comparing φ), and the difference between them will be shown later in Sect. 3.

Fig. 1
figure 1

The near-axis schematic diagram of three-wave phase matching. α(β) denotes the angle between wave vectors \(\mathop{k}\limits^{\rightharpoonup} _{3}\) and \(\mathop{k}\limits^{\rightharpoonup} _{2} (\mathop{k}\limits^{\rightharpoonup} _{1} )\), and γ denotes the angle between wave vectors \(\mathop{k}\limits^{\rightharpoonup} _{1}\) and \(\mathop{k}\limits^{\rightharpoonup} _{2}\)

The wave vector of three-wave noncollinear phase matching in arbitrary direction is decomposed into three coordinate axes, and the conservation of momentum condition of Eq. (1) can be rewritten as [22]:

$$\left\{ {\begin{array}{*{20}l} {k_{1} \sin \theta_{1} \cos \varphi_{1} + k_{2} \sin \theta_{2} \cos \varphi_{2} - k_{3} \sin \theta_{3} \cos \varphi_{3} = 0} \hfill \\ {k_{1} \sin \theta_{1} \sin \varphi_{1} + k_{2} \sin \theta_{2} \sin \varphi_{2} - k_{3} \sin \theta_{3} \cos \varphi_{3} = 0} \hfill \\ {k_{1} \cos \theta_{1} + k_{2} \cos \theta_{2} - k_{3} \cos \theta_{3} = 0} \hfill \\ \end{array} } \right.,$$
(2)

Equation (3) concerning the three waves in the same plane, the vector triangles and the angular relationship:

$$\left\{ {\begin{array}{*{20}l} {k_{3}^{2} = k_{1}^{2} + k_{2}^{2} + 2k_{1} k_{2} \left[ {\cos \theta_{1} \cos \theta_{2} + \sin \theta_{1} \sin \theta_{2} \cos (\varphi_{1} - \varphi_{2} )} \right]} \hfill \\ \begin{gathered} a\cos \left[ {\cos \theta_{1} \cos \theta_{2} + \sin \theta_{1} \sin \theta_{2} \cos (\varphi_{1} - \varphi_{2} )} \right] = a\cos \left[ {\cos \theta_{1} \cos \theta_{3} + ...} \right. \hfill \\ \, \left. { \, \sin \theta_{1} \sin \theta_{3} \cos (\varphi_{1} - \varphi_{3} )} \right] + a\cos \left[ {\cos \theta_{2} \cos \theta_{3} + \sin \theta_{2} \sin \theta_{3} \cos (\varphi_{2} - \varphi_{3} )} \right] \hfill \\ \end{gathered} \hfill \\ {k_{2}^{2} = k_{1}^{2} + k_{3}^{2} - 2k_{1} k_{3} \left[ {\cos \theta_{1} \cos \theta_{3} + \sin \theta_{1} \sin \theta_{3} \cos (\varphi_{1} - \varphi_{3} )} \right]} \hfill \\ \end{array} } \right.,$$
(3)

where \(k_{i} = \omega_{i} n_{i} /c\), for arbitrary directions THG phase matching conditions can be obtained by combining Eqs. (2) and (3), where \(\omega_{2} = 2\omega_{1} ,\omega_{3} = 3\omega_{1}\).

$$\left\{ {\begin{array}{*{20}l} {n_{1} \sin \theta_{1} \cos \varphi_{1} + 2n_{2} \sin \theta_{2} \cos \varphi_{2} - 3n_{{3}} \sin \theta_{{3}} \cos \varphi_{{3}} { = 0}} \hfill \\ {n_{1} \sin \theta_{1} \sin \varphi_{1} + 2n_{2} \sin \theta_{2} \sin \varphi_{2} - 3n_{3} \sin \theta_{3} \sin \varphi_{3} = 0} \hfill \\ {n_{1} \cos \theta_{1} + 2n_{2} \cos \theta_{2} - 3n_{3} \cos \theta_{3} = 0} \hfill \\ {9n_{3}^{2} - n_{1}^{2} - 4n_{2}^{2} - 4n_{1} n_{2} \left[ {\cos \theta_{1} \cos \theta_{2} + \sin \theta_{1} \sin \theta_{2} \cos (\varphi_{1} - \varphi_{2} )} \right] = 0} \hfill \\ \begin{gathered} a\cos \left[ {\cos \theta_{1} \cos \theta_{2} + \sin \theta_{1} \sin \theta_{2} \cos (\varphi_{1} - \varphi_{2} )} \right] = a\cos \left[ {\cos \theta_{1} \cos \theta_{3} + ...} \right. \hfill \\ \left. { \, \sin \theta_{1} \sin \theta_{3} \cos (\varphi_{1} - \varphi_{3} )} \right] + a\cos \left[ {\cos \theta_{2} \cos \theta_{3} + \sin \theta_{2} \sin \theta_{3} \cos (\varphi_{2} - \varphi_{3} )} \right] \hfill \\ \end{gathered} \hfill \\ {4n_{2}^{2} - n_{1}^{2} - 9n_{3}^{2} + 6n_{1} n_{3} \left[ {\cos \theta_{1} \cos \theta_{3} + \sin \theta_{1} \sin \theta_{3} \cos (\varphi_{1} - \varphi_{3} )} \right] = 0} \hfill \\ \end{array} } \right.,$$
(4)

Equation (5) is the refractive index surface equation of a biaxial crystal [23].

$$\frac{{k_{x}^{2} }}{{n^{ - 2} - n_{x}^{ - 2} }} + \frac{{k_{y}^{2} }}{{n^{ - 2} - n_{y}^{ - 2} }} + \frac{{k_{z}^{2} }}{{n^{ - 2} - n_{z}^{ - 2} }} = 0,$$
(5)

Here \(k_{x} = \sin \theta \cos \varphi\),\(k_{y} = \sin \theta \sin \varphi\) and \(k_{z} = \cos \theta\) represent the component of the unit wave vector on the coordinate axis.\(n_{x} ,n_{y}\) and \(n_{z}\) correspond to the principal refractive indexes at a given wavelength and can be solved by the Sellmeier equations of the crystal, where \(n_{x} < n_{y} < n_{z}\).

We make the following substitutions:

$$\left\{ {\begin{array}{*{20}l} {a = n_{x}^{ - 2} ,b = n_{y}^{ - 2} ,c = n_{z}^{ - 2} } \hfill \\ {B = - (b + c)\sin^{2} \theta \cos^{2} \varphi - (a + c)\sin^{2} \theta \sin^{2} \varphi - (a + b)\cos^{2} \theta } \hfill \\ {C = bc\sin^{2} \theta \cos^{2} \varphi + ac\sin^{2} \theta \sin^{2} \varphi + ab\cos^{2} \theta } \hfill \\ {x = n^{ - 2} } \hfill \\ \end{array} } \right.,$$
(6)

Equation (5) can be rewritten as:

$$x^{2} + Bx + C{ = 0,}$$
(7)

This is a quadratic equation, we can obtain the refractive indexes for the two polarizations (fast and slow) by the root formula. The refractive index of a wave vector inside a crystal depends on the polarization, wavelength, polarization and azimuthal angles.

$$\left\{ {\begin{array}{*{20}c} {n_{fast} = \sqrt 2 /\sqrt { - B + \sqrt {B^{2} - 4C} } } \\ {n_{slow} = \sqrt 2 /\sqrt { - B - \sqrt {B^{2} - 4C} } } \\ \end{array} } \right.,$$
(8)

2.2 Calculation process based on GD algorithm

Equation (4) is a system of nonlinear equations with six variables and six equations which cannot be solved by analytical or exhaustive methods. Therefore, we propose a calculational method based on the GD algorithm which is widely applied in the field of machine learning and optimization [24, 25]. The loss function of the GD algorithm is a critical parameter which can represent the difference between the predicted value and the true value and the iteration direction is determined by the gradient of the loss function concerning the independent variable. Subtracting the gradient value from the independent variable allows for a step-by-step iterative reduction of the target loss function until the error threshold is met. Thus, applying the GD method to the problem of solving a system of nonlinear equations can quickly converge to a locally optimal solution [26].

As for the solution of Eq. (4), replacing \(\theta_{1} ,\theta_{2} ,\theta_{3} ,\varphi_{1} ,\varphi_{2} ,\varphi_{3}\) by \(x_{1} ,x_{2} ,x_{3} ,x_{4} ,x_{5} ,x_{6} ,\) respectively, it can be transformed into a set of six multivariate functions of Eq. (9) and the corresponding loss functions could be formed by the root mean square (RMS) of each multivariate function. The iteration directions of the six independent variables can be combined to form an iteration vector. Each gradient can result in a positive, negative, or zero value, signifying diverse iterative directions. The determination of each gradient is not solely governed by a single loss function. Therefore, the key is how to determine the descent values of the six independent variables in each round of iteration. A simple method is to take the average value of partial derivatives of different loss functions for the same independent variable as the descent value of this independent variable, which may ignore some faster descent directions from the overall view, and even cause the iteration to be difficult to converge. In this work, we propose a method wherein the maximum absolute value in all iterative directions is retained for each independent variable. This approach results in several iterative vectors formed by combining these respective iterative directions of each independent variable. Ultimately, the best iterative vector is selected based on its capacity to minimize the sum of all loss functions. This method could effectively accelerate the process of iterative convergence.

$$\left\{ \begin{gathered} f_{1} (x) = n_{1} \sin x_{1} \cos x_{4} + 2n_{2} \sin x_{2} \cos x_{5} - 3n_{{3}} \sin x_{{3}} \cos x_{6} { = 0} \hfill \\ f_{2} (x) = n_{1} \sin x_{1} \sin x_{4} + 2n_{2} \sin x_{2} \sin x_{5} - 3n_{3} \sin x_{{3}} \sin x_{6} = 0 \hfill \\ f_{3} (x) = n_{1} \cos x_{1} + 2n_{2} \cos x_{2} - 3n_{3} \cos x_{{3}} = 0 \hfill \\ f_{4} (x) = {\text{9n}}_{3}^{2} - n_{1}^{2} - 4n_{2}^{2} - 4n_{1} n_{2} \left[ {\cos x_{1} \cos x_{2} + \sin x_{1} \sin x_{2} \cos (x_{4} - x_{5} )} \right] = 0 \hfill \\ f_{5} (x) = a\cos \left[ {\cos x_{1} \cos x_{2} + \sin x_{1} \sin x_{2} \cos (x_{4} - x_{5} )} \right] - a\cos \left[ {\cos x_{1} \cos x_{{3}} + ...} \right. \hfill \\ \left. { \, \cos x_{1} \cos x_{{3}} } \right] - a\cos \left[ {\cos x_{2} \cos x_{{3}} + \sin x_{2} \sin x_{{3}} \cos (x_{5} - x_{6} )} \right] = 0 \hfill \\ f_{6} (x) = 4n_{2}^{2} - n_{1}^{2} - 9n_{3}^{2} + 6n_{1} n_{3} \left[ {\cos x_{1} \cos x_{{3}} + \sin x_{1} \sin x_{{3}} \cos (x_{4} - x_{6} )} \right] = 0 \hfill \\ \end{gathered} \right.,$$
(9)

Figure 2 shows the computational flowchart based on the GD algorithm, and the detailed iterative process of iterative are as follows.

Fig. 2
figure 2

Flowchart of the calculation based on the GD algorithm

  • Step 1: Parameters definitions. R is the maximum iteration number and ε is the error threshold of loss functions. The random initial independent variables vector is \({\varvec{x}}^{{{\mathbf{(}}{\varvec{n}}{\mathbf{)}}}} = (x_{1}^{(n)} ,x_{2}^{(n)} ,x_{3}^{(n)} ,x_{4}^{(n)} ,x_{5}^{(n)} ,x_{6}^{(n)} )\), in which n represents the iterative count, and n = 0 means the initial iteration. According to the relationship between the angles of the three vectors, the initial value of \(x_{1}^{(0)} ,x_{3}^{(0)} ,x_{4}^{(0)} ,x_{6}^{(0)}\) could be set as four random data between the targeted range, and then the initial value of \(x_{2}^{(0)} ,x_{5}^{(0)}\) could be set as \(\frac{{x_{1}^{(0)} + x_{3}^{(0)} }}{2},\frac{{x_{4}^{(0)} + x_{6}^{(0)} }}{2}\) respectively.

  • Step 2: Transform the nonlinear equations of Eq. (9) to a vector function \({\varvec{F}}{\mathbf{(}}{\varvec{x}}{\mathbf{)}} = 0\) and the corresponding loss vector function is \({\varvec{L}}{\mathbf{(}}{\varvec{x}}{\mathbf{)}} = 0\), whose component could be represented as follows: \({\varvec{L}}_{j} = \frac{1}{2}(f_{j} ({\varvec{x}}) - 0)^{2} = \frac{1}{2}f_{j} ({\varvec{x}})^{2} ,j = 1,2,...,6\).

  • Step 3: Calculate the value of \({\varvec{L}}({\varvec{x}}^{{({\varvec{n}})}} )\), and then sum all the results of six components together as the n th iteration’s loss value \({\varvec{E}}_{{\varvec{n}}}\). If the loss value \({\varvec{E}}_{{\varvec{n}}}\) is less than ε, then the vector \({\varvec{x}}^{{({\varvec{n}})}}\) is just one of the valid solutions of the nonlinear functions and the iteration process could stop. If the iterative count exceeds the maximum iteration number, i.e., n > R, the iteration process should also stop, otherwise, the process should go on.

  • Step 4: Calculate the Jacobi matrix of \({\varvec{L}}({\varvec{x}}^{{({\varvec{n}})}} )\) denoted as \({\varvec{J}}_{{\varvec{L}}}\). Analyze each column of the matrix to get the average of positive items, the average of negative items and the zero item, denoted as \(A_{j}^{ + } ,A_{j}^{ - } ,A_{j}^{0} ,\) respectively, which can be formed into iterative direction vectors \({\varvec{C}}_{{\varvec{j}}} = (A_{j}^{ + } ,A_{j}^{ - } ,A_{j}^{0} ).\) Specifically, the iterative direction vectors \({\varvec{C}}_{{\varvec{j}}}\) as at least one component when the corresponding column has only positive items, or only negative items or only zero items. Then assemble gradient vectors \({\varvec{G}}_{{\varvec{m}}}\) whose jth component is one of the \({\varvec{C}}_{{\varvec{j}}}\) vector’s item. By denoting the number of \({\varvec{C}}_{{\varvec{j}}}\) vector’s components as Nj, the count of the gradient vectors could be represented as \(M = \prod_{1}^{6} N_{j}\) and the gradient vectors could be denoted as \({\varvec{G}}_{{\varvec{m}}} ,m = 1,2,...,M\).

    $${\varvec{J}}_{{\varvec{L}}} = \left[ {\begin{array}{*{20}l} {\frac{{\partial L_{1} }}{{\partial x_{1} }}} \hfill & {\frac{{\partial L_{2} }}{{\partial x_{2} }}} \hfill & \cdots \hfill & {\frac{{\partial L_{1} }}{{\partial x_{6} }}} \hfill \\ {\frac{{\partial L_{2} }}{{\partial x_{1} }}} \hfill & {\frac{{\partial L_{2} }}{{\partial x_{2} }}} \hfill & \cdots \hfill & {\frac{{\partial L_{2} }}{{\partial x_{6} }}} \hfill \\ { \, \vdots } \hfill & { \, \vdots } \hfill & \ddots \hfill & { \, \vdots } \hfill \\ {\frac{{\partial L_{6} }}{{\partial x_{1} }}} \hfill & {\frac{{\partial L_{6} }}{{\partial x_{2} }}} \hfill & \cdots \hfill & {\frac{{\partial L_{6} }}{{\partial x_{6} }}} \hfill \\ \end{array} } \right],$$
    (10)
  • Step 5: Calculate the value of the loss function at each \({\varvec{x}}^{{{\mathbf{(}}{\varvec{n}}{\mathbf{)}}}} - {\varvec{G}}_{{\varvec{m}}}\), and denote the final iterative gradient vector for the n th iteration as \({\varvec{G}}_{{{\varvec{min}}}} = argmin\left\{ {{\varvec{x}}^{{{\mathbf{(}}{\varvec{n}}{\mathbf{)}}}} - {\varvec{G}}_{{\varvec{m}}} } \right\}\), with the minimal value of loss function.

  • Step 6: Update the iterative independent variables vector as \({\varvec{x}}^{{{\mathbf{(}}\user2{n + 1}{\mathbf{)}}}} = {\varvec{x}}^{{{\mathbf{(}}{\varvec{n}}{\mathbf{)}}}} - {\varvec{G}}_{\min }\) and update the iterative count as n = n + 1 then repeat the process from step 3.

3 Calculational results: take 1053 nm THG in LBO as an example

Our method realizes critical phase matching calculations for collinear and noncollinear configurations, principal and non-principal plane cases, type-I (ss-f) and type-II (fs-f). Next, we will delve the phase matching calculation of THG in a negative biaxial crystal LBO with a fundamental wavelength of 1053 nm, where ω1 = ω, ω2 = 2ω, ω3 = 3ω. For simplicity, we only consider monochromatic waves.

3.1 Collinear THG phase matching

Collinear THG phase matching geometry is shown in Fig. 3, where \(\varphi_{1} = \varphi_{2} = \varphi_{3}\),\(\theta_{1} = \theta_{2} = \theta_{3}\) and \(\alpha = \beta = \gamma = 0\). Based on the previous studies [5, 9], the phase matching condition can be obtained.

$$\left\{ {\begin{array}{*{20}c} {s + s \to f:n_{\omega }^{s} + 2n_{2\omega }^{s} = 3n_{3\omega }^{f} } \\ {f + s \to f:n_{\omega }^{f} + 2n_{2\omega }^{s} = 3n_{3\omega }^{f} } \\ \end{array} } \right.,$$
(11)
Fig. 3
figure 3

Collinear phase matching geometries

The first is the exhaustive search method. The phase matching curves (the curve formed by scattered points) of type-I and type-II can be obtained through iteration over the two variables, θ and φ, ranging from 0 to 180°, as shown in Fig. 4a and c. The second is our GD method. By setting \(\theta_{1} = \theta_{2} = \theta_{3}\) and \(\varphi_{1} = \varphi_{2} = \varphi_{3}\), with \(\theta\) and \(\varphi\) ranging from 0 to 180°, we can obtain the phase matching curves for a half sphere, illustrated in Fig. 4b and d. From Fig. 4 we can see that the calculation results of the methods of exhaustive search and GD are in high agreement. Type-I with solutions ranges: θ is from 16.8° to 163.2°, φ is from 0 to 45.66° and 134.34° to 180°. Type-II with solutions ranges: θ is from 45.37° to 134.63°, φ is from 61.12° to 118.88°. The phase matching curves of type-I and type-II collinear THG are symmetric about θ = 90° and φ = 90° (also symmetric about θ = 180° and φ = 180°). In other words, it is just needed to calculate the phase matching curves within the first octant (θ = [0–90°], φ = [0–90°]).

Fig. 4
figure 4

Collinear THG phase matching curves, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm. a ss-f, exhaustive search method; b ss-f, GD method; c fs-f, exhaustive search method; d fs-f, GD method

3.2 Noncollinear THG phase matching in principal planes

Noncollinear THG phase matching geometries in the principal plane are shown in Fig. 5. For near-axis structure: \(\theta_{2} = \theta_{3} + \alpha\) and \(\theta_{1} = \theta_{3} - \beta\); for off-axis structure: \(\theta_{1} = \theta_{3} + \beta\) and \(\theta_{2} = \theta_{3} - \alpha\), where α + β = γ.

Fig. 5
figure 5

Noncollinear phase matching geometries in principal planes. a Near-axis structure; b Off-axis structure

In the present researches, noncollinear phase matching in the principal plane is generally calculated by analytical or exhaustive search methods [12]. According to Fig. 5, the phase matching condition can be rewritten as Eq. (12). The only two realizations of 1053nm fundamental wave noncollinear THG in the principal planes are type-I in the XY plane and type-II in the YZ plane. No other type of THG in the principal planes can be realized, as the effective nonlinear coefficient is zero (\(d_{eff} = 0\)) or Eq. (12) without a solution.

$$\left\{ {\begin{array}{*{20}l} {3n_{3\omega } = n_{\omega } \cos \alpha + 2n_{2\omega } \cos \beta } \hfill \\ {2n_{2\omega } \sin \alpha = n_{\omega } \sin \beta } \hfill \\ \end{array} } \right.,$$
(12)

3.2.1 Type-I, s + s → f in XY principal plane

There are three methods to calculate the phase matching angles for type-I THG in XY principal plane, θ = 90°. The first is the analytical method. Equation (13) is the analytical expression for type-I noncollinear THG phase matching angles (\(\varphi_{3}\)) of \(\mathop{k}\limits^{\rightharpoonup} _{3}\), derived from Eq. (12). By successively varying the angle α, we can derive the phase matching curves are shown in Fig. 6a. Where, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm; When \(\alpha = \beta = \gamma = 0\) and \(\varphi_{1} = \varphi_{1} = \varphi_{1}\) = 38.224°, it signifies collinear phase matching.

$$\left\{ {\begin{array}{*{20}l} {\varphi_{3} \left( {\lambda_{3} } \right) = \arcsin \left\{ {\frac{{n_{x} \left( {\lambda_{3} } \right)}}{{\frac{{n_{z} \left( {\lambda_{2} } \right)}}{{\lambda_{2} }}\cos \alpha + \frac{{n_{z} \left( {\lambda_{1} } \right)}}{{\lambda_{1} }}\cos \beta }}\left\{ {\frac{{\left[ {\frac{{n_{y} \left( {\lambda_{3} } \right)}}{{\lambda_{3} }}} \right]^{2} - \left[ {\frac{{n_{z} \left( {\lambda_{2} } \right)}}{{\lambda_{2} }}\cos \alpha + \frac{{n_{z} \left( {\lambda_{1} } \right)}}{{\lambda_{1} }}\cos \beta } \right]^{2} }}{{n_{y}^{2} \left( {\lambda_{3} } \right) - n_{x}^{2} \left( {\lambda_{3} } \right)}}} \right\}^{1/2} } \right\}} \hfill \\ {\beta = \arcsin \left( {\frac{{n_{2}^{s} }}{{n_{1}^{s} }}\frac{{\lambda_{1} }}{{\lambda_{2} }}\sin \alpha } \right)} \hfill \\ \end{array} } \right.,$$
(13)
Fig. 6
figure 6

Noncollinear phase matching curves of type-I (ss-f) THG in XY principal plane, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm. a Analytical method; b Exhaustive search method; c GD method; d Near-axis and off-axis

The second is the exhaustive search method. Replacing the refractive index expression in Eq. (12): \(n_{1} = n_{\omega }^{s} ,n_{2} = n_{2\omega }^{s} ,n_{3} = n_{3\omega }^{f}\). The phase matching curves can be obtained by iterating over the three variables: φ3, α and β, as shown in Fig. 6b.

Distinguishing from the preceding two existing methods, the third is our novel method which is based on the GD algorithm. Where \(R = 2000,\varepsilon = 10^{ - 12}\), fixing θ = 90° and φ within 35°–145. The phase matching curves are shown in Fig. 6c. It can be noticed that the results calculated by our method are highly consistent with the previous two methods. The phase matching curves of φ3-α, φ3-β, and φ3-γ are symmetric about φ3 = 90° with γmax = 18.53° (αmax = 6.11°, βmax = 12.42°) when φ3 = 90°. The phase matching curves of the near-axis and off-axis can be further obtained, as shown in Fig. 6d. Where φ1, φ2, φ3 denote near-axis, φ1ʹ, φ2ʹ, φ3ʹ denote off-axis, and φ3 = φ3ʹ (green curve) is symmetric about φ = 90°. Further, it can be observed that the phase matching angles between the near and off-axis are symmetric about φ = 90°.

3.2.2 Type-II, f + s → f in YZ principal plane

There are two methods to calculate the phase matching angles for type-II THG in the YZ principal plane, φ = 90°. Type-II phase matching is unable to derive analytical expressions. The first is the exhaustive search method. Replacing the refractive index expression in Eq. (12): \(n_{1} = n_{\omega }^{f} ,n_{2} = n_{2\omega }^{s} ,n_{3} = n_{3\omega }^{f}\). The phase matching curves can be obtained by iterating over the three variables: θ3, α and β, as shown in Fig. 7a. Where α, β, γ denote the near-axis, αʹ, βʹ, γʹ denote the off-axis.

Fig. 7
figure 7

Noncollinear phase matching curves of type-II (fs-f) THG in YZ principal plane, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm. a Exhaustive search method; b GD method; c Near-axis and off-axis

Distinguished from the exhaustive search method, the second is our novel method which is based on GD. Where \(R = 2000,\varepsilon = 10^{ - 10}\), fixing φ = 90° and θ within 40°–140°. The phase matching curves are shown in Fig. 7b. We can also find that the results calculated by our method are highly consistent with the exhaustive search method. The phase matching curves of θ3-α, θ3-β, and θ3-γ are asymmetric about θ3 = 90°. The near-axis and off-axis three-wave phase matching curves can be further obtained, as shown in Fig. 7c. Where θ1, θ2, θ3 denote near-axis, θ1ʹ, θ2ʹ, θ3ʹ denote off-axis, and θ2 = θ2ʹ (green curve) is symmetric about θ = 90°. It can also be found that the phase matching angles between the near and off-axis are symmetric about θ = 90°.

Moreover, the accuracy of different methods is analyzed by comparing their effects on wave vector mismatch and conversion efficiencies. For THG conversion efficiency (η) is related to the wave vector mismatch (\(\Delta k\)) [21].

$$\left\{ {\begin{array}{*{20}c} {\eta ^{\prime} = \sin c^{2} (\left| {\Delta k} \right|L/2)} \\ {\Delta k = \frac{2\pi }{{\lambda_{0} }}\Delta n} \\ \end{array} } \right.,$$
(14)

where L is the crystal thickness, \(\eta \propto \eta ^{\prime},\lambda_{0} = 1053nm\). \(\Delta n\) is the difference in refractive index, which can be obtained from Eqs. (9), (11), (12) and (13). For the analytical method, \(\Delta k = 0,\eta ^{\prime} = 1\). In the exhaustive method and GD method we set two different thresholds, μ and ε. For the exhaustive search method, \(\mu = \Delta n = 10^{ - 6}\), \(\Delta k = \frac{2\pi }{{\lambda_{0} }}\Delta n = \frac{2\pi }{{\lambda_{0} }}\mu = 5.97 \cdot 10^{ - 3} /mm\), when L = 1 mm, η’ = 0.9999; when L = 5 mm, η’ = 0.9971; when L = 10 mm, η’ = 0.9883. For our GD method, \(\varepsilon = 10^{ - 12} ,\Delta n = \sqrt {2\varepsilon }\), \(\Delta k = \frac{2\pi }{{\lambda_{0} }}\Delta n = \frac{2\pi }{{\lambda_{0} }}\sqrt {2\varepsilon } = 8.44 \cdot 10^{ - 3} /mm\), when L = 1 mm, η’ = 0.9998; when L = 5 mm, η’ = 0.9942; when L = 10 mm, η’ = 0.9768. By comparing the η’ values of other methods, the accuracy of our GD method is high enough.

3.3 Noncollinear THG phase matching outside the principal planes

In subsections 3.1 and 3.2, the analytic and exhaustive search methods can calculate phase matching of collinear and noncollinear in the principal planes, but they are ineffective in calculating noncollinear phase matching outside the principal planes. Next, we will apply our method to conduct noncollinear THG phase matching calculations outside the principal planes, the diagram is shown in Fig. 1.

3.3.1 Type-I, s + s → f

For type-I noncollinear THG phase matching outside of principal planes, the refractive indices \(n_{1}\),\(n_{2}\) and \(n_{3}\) in Eq. (9) can be replaced by \(n_{\omega }^{s} ,n_{2\omega }^{s} ,n_{3\omega }^{f}\) respectively. The results obtained through our GD method are depicted in Fig. 8, where \(R = 3000,\varepsilon = 10^{ - 10}\). Figure 8a shows the total phase matching distributions, including both near-axis and off-axis types; Fig. 8b and c correspond to near-axis and off-axis phase matching distributions, respectively; Fig. 8d is the projection of Fig. 8a in the θ-φ plane, and the black line represents the collinear phase matching curve. k1, k2 and k3 correspond to near-axis structure; k1’, k2’ and k3’ correspond to off-axis structure. Figure 8 reveals that the phase matching distributions of the near-axis type and the off-axis type exhibit approximately symmetric about θ = 90°. The outline of the arbitrarily directions phase-matching distributions projected in the θ-φ plane agree with the collinear phase-matching curve (black curve). If the number of calculations is large enough, the phase matching results in arbitrary directions can perfectly include phase matching in the collinear and principal planes.

Fig. 8
figure 8

Noncollinear phase matching of type-I (ss-f) THG outside of principal planes, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm. a Near-axis and off-axis; b Near-axis; c Off-axis; d Projection to the θ-φ plane

3.3.2 Type-II, f + s → f

Similar to subsection 3.3.1, for type-II noncollinear THG phase matching outside of principal planes, the refractive indices \(n_{1}\),\(n_{2}\) and \(n_{3}\) in Eq. (9) can be replaced by \(n_{\omega }^{f} ,n_{2\omega }^{s} ,n_{3\omega }^{f}\) respectively. Figure 9 shows the distributions of phase matching in arbitrary direction obtained by the GD method, where \(R = 3000,\varepsilon = 10^{ - 10}\). From Fig. 9, we can also find that the phase matching distributions of the near-axis type and the off-axis type are approximately symmetric about θ = 90°. The outline of the arbitrarily directions phase-matching distributions projected in the θ-φ plane also agrees with the collinear phase-matching curve (black curve).

Fig. 9
figure 9

Noncollinear phase matching of type-II (fs-f) THG outside of principal planes, λ1 = 1.053 μm, λ2 = 0.5265 μm, λ3 = 0.351 μm. a Near-axis and off-axis; b Near-axis; c Off-axis; d Projection to the θ-φ plane

3.4 Effective nonlinear coefficient for THG phase matching

The conversion efficiency (η) of the three-wave interaction process is proportional to the square of the effective nonlinearity coefficient (\(d_{eff}\)), \(\eta \propto \left( {d_{eff} } \right)^{2}\). The effective nonlinear coefficients are related to the second-order nonlinear tensor (\(d_{ijk}\)) of crystal and the unit-polarized vectors (\(\alpha_{i} ,\alpha_{j} ,\alpha_{k}\)) of the interacting three waves [21, 22].

$$d_{eff} = a_{i} d_{ijk} a_{j} a_{k}$$
(15)

For biaxial crystals, the unit politicized vectors of the slow and fast waves are respectively:

$$\begin{gathered} a^{{e_{s} }} = \left( {\begin{array}{*{20}c} {a_{1}^{{e_{s} }} } \\ {a_{2}^{{e_{s} }} } \\ {a_{3}^{{e_{s} }} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {\cos \theta \cos \varphi \cos \delta_{i} - \sin \varphi \sin \delta_{i} } \\ {\cos \theta \sin \varphi \cos \delta_{i} + \cos \varphi \sin \delta_{i} } \\ { - \sin \theta \cos \delta_{i} } \\ \end{array} } \right), \hfill \\ a^{{e_{f} }} = \left( {\begin{array}{*{20}c} {a_{1}^{{e_{f} }} } \\ {a_{2}^{{e_{f} }} } \\ {a_{3}^{{e_{f} }} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} { - \cos \theta \cos \varphi \sin \delta_{i} - \sin \varphi \cos \delta_{i} } \\ { - \cos \theta \sin \varphi \sin \delta_{i} + \cos \varphi \cos \delta_{i} } \\ {\sin \theta \sin \delta_{i} } \\ \end{array} } \right), \hfill \\ \end{gathered}$$
(16)

where δi is the angle between e(ωi) and the plane z-k, which is the function of θ, φ and Ωi. e(ωi) is the component of the electric field corresponding to the wave vector. Ωi is the angle between the optic axis and the z-axis at frequency ωi in the biaxial crystal [21, 22].

$$\left\{ {\begin{array}{*{20}c} {\cot 2\delta_{i} = \frac{{\cot^{2} \Omega_{i} \sin^{2} \theta - \cos^{2} \theta \cos^{2} \varphi + \sin^{2} \varphi }}{\cos \theta \sin (2\varphi )}} \\ {\tan \Omega_{i} = \frac{{n_{z} (\omega_{i} )}}{{n_{x} (\omega_{i} )}}\left[ {\frac{{n_{y}^{2} (\omega_{i} ) - n_{x}^{2} (\omega_{i} )}}{{n_{z}^{2} (\omega_{i} ) - n_{y}^{2} (\omega_{i} )}}} \right]^{1/2} } \\ \end{array} } \right.,$$
(17)

The second-order nonlinear tensor of LBO crystals.

$$d_{ijk} = \left( {\begin{array}{*{20}c} 0 & 0 & 0 & 0 & 0 & {d_{15} } \\ {d_{31} } & {d_{33} } & {d_{32} } & 0 & 0 & 0 \\ 0 & 0 & 0 & {d_{24} } & 0 & 0 \\ \end{array} } \right),$$
(18)

Equation (18) is the expression for the type-I phase matching.

$$\begin{gathered} d_{eff}^{ssf} ({\rm I}) = a_{i}^{{e_{3} }} d_{ijk} a_{j}^{{e_{1} }} a_{k}^{{e_{2} }} = a_{i}^{{e_{3,f} }} d_{ijk} a_{j}^{{e_{1,s} }} a_{k}^{{e_{2,s} }} \hfill \\ = d_{31} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )(\cos \theta_{1} \cos \varphi_{1} \cos \delta_{1} - \sin \varphi_{1} \sin \delta_{1} )(\cos \theta_{2} \cos \varphi_{2} \cos \delta_{2} - \sin \varphi_{2} \sin \delta_{2} ) \hfill \\ + d_{33} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )(\cos \theta_{1} \sin \varphi_{1} \cos \delta_{1} + \cos \varphi_{1} \sin \delta_{1} )(\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} ) \hfill \\ + d_{32} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )\sin \theta_{1} \cos \delta_{1} \sin \theta_{2} \cos \delta_{2} \hfill \\ + d_{24} \sin \theta_{3} \sin \delta_{3} [ - \sin \theta_{1} \cos \delta_{1} (\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} ) - \sin \theta_{2} \cos \delta_{2} (\cos \theta_{1} \sin \varphi_{1} \cos \delta_{1} + \cos \varphi_{1} \sin \delta_{1} )] \hfill \\ + d_{15} ( - \cos \theta_{3} \cos \varphi_{3} \sin \delta_{3} - \sin \varphi_{3} \cos \delta_{3} )[(\cos \theta_{1} \sin \varphi_{1} \cos \delta_{1} + \cos \varphi_{1} \sin \delta_{1} )(\cos \theta_{2} \cos \varphi_{2} \cos \delta_{2} - \sin \varphi_{2} \sin \delta_{2} ) + ... \hfill \\ \, (\cos \theta_{1} \cos \varphi_{1} \cos \delta_{1} - \sin \varphi_{1} \sin \delta_{1} )(\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} )], \hfill \\ \end{gathered}$$
(19)

Equation (19) is the expression for the type-II phase matching.

$$\begin{gathered} d_{eff}^{fsf} ({\text{II}}) = a_{i}^{{e_{3} }} d_{ijk} a_{j}^{{e_{1} }} a_{k}^{{e_{2} }} = a_{i}^{{e_{3,f} }} d_{ijk} a_{j}^{{e_{1,f} }} a_{k}^{{e_{2,s} }} \hfill \\ = d_{31} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )( - \cos \theta_{1} \cos \varphi_{1} \sin \delta_{1} - \sin \varphi_{1} \cos \delta_{1} )(\cos \theta_{2} \cos \varphi_{2} \cos \delta_{2} - \sin \varphi_{2} \sin \delta_{2} ) \hfill \\ + d_{33} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )( - \cos \theta_{1} \sin \varphi_{1} \sin \delta_{1} + \cos \varphi_{1} \cos \delta_{1} )(\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} ) \hfill \\ + d_{32} ( - \cos \theta_{3} \sin \varphi_{3} \sin \delta_{3} + \cos \varphi_{3} \cos \delta_{3} )( - \sin \theta_{1} \sin \delta_{1} \sin \theta_{2} \cos \delta_{2} ) \hfill \\ + d_{24} \sin \theta_{3} \sin \delta_{3} \left[ {\sin \theta_{1} \sin \delta_{1} (\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} ) - \sin \theta_{2} \cos \delta_{2} ( - \cos \theta_{1} \sin \varphi_{1} \sin \delta_{1} + \cos \varphi_{1} \cos \delta_{1} )} \right] \hfill \\ + d_{15} ( - \cos \theta_{3} \cos \varphi_{3} \sin \delta_{3} - \sin \varphi_{3} \cos \delta_{3} )[( - \cos \theta_{1} \sin \varphi_{1} \sin \delta_{1} + \cos \varphi_{1} \cos \delta_{1} )(\cos \theta_{2} \cos \varphi_{2} \cos \delta_{2} - \sin \varphi_{2} \sin \delta_{2} ) + ... \hfill \\ \, ( - \cos \theta_{1} \cos \varphi_{1} \sin \delta_{1} - \sin \varphi_{1} \cos \delta_{1} )(\cos \theta_{2} \sin \varphi_{2} \cos \delta_{2} + \cos \varphi_{2} \sin \delta_{2} )], \hfill \\ \end{gathered}$$
(20)

Based on Ref. [25], we derive the effective nonlinear coefficient expressions of THG. The second-order nonlinear tensor coefficient of LBO crystals, where d31 = 0.67 pm/V, d32 =  ± 0.85 pm/V, d33 =  ± 0.04 pm/V [21]. For collinear THG phase matching,\(\theta_{1} = \theta_{2} = \theta_{3} = \theta ,\varphi_{1} = \varphi_{2} = \varphi_{3} = \varphi\) and \(\delta_{1} = \delta_{2} = \delta_{3} = \delta\), Eqs. (19) and (20) can be simplified. In the XY principal plane θ = 90° and δ = 0, we can simplify the expressions of effective nonlinear coefficients:\(d_{eff}^{XY,ssf} ({\rm I}) = d_{32} \cos \varphi_{3}\) and \(d_{eff}^{XY,fsf} ({\text{II}}) = 0\). In the YZ principal plane φ = 90° and δ = 0, \(d_{eff}^{YZ,ssf} ({\rm I}) = 0\) and \(d_{eff}^{YZ,fsf} ({\text{II}}) = d_{15} \cos \theta_{2}\). Similarly, when considering the XZ principal plane, no solution exists for THG phase matching as discussed in subsection 3.2. Its effective nonlinear coefficient expression is not in the scope of our discussion. For collinear and principal planes SHG, the effective nonlinear coefficients we calculate are in agreement with Ref. [21].

The distributions of effective nonlinear coefficients can be obtained by substituting the phase matching angles calculated in subsections 3.1, 3.2, and 3.3 into Eqs. (14) and (15). As shown in Fig. 10, the effective nonlinear coefficient distributions for collinear (red points) and XY principal plane (blue points) in the LBO crystal correspond to the results of the phase matching calculations in Figs. 4b and 6, respectively. Figure 10a is the distribution of \(d_{eff} (\theta ,\varphi )\), We note that the maximum and minimum points of the collinear align with those of the XY principal plane, \((d_{eff} )_{\min }\) = − 0.66834 pm/V at θ = 90° and φ = 38.16°, \((d_{eff} )_{\max }\) = 0.66834 pm/V at θ = 90° and φ = 141.84°, and \(\left\{ {(d_{eff} )_{\min } } \right\}^{2} = \left\{ {(d_{eff} )_{\max } } \right\}^{2}\). We can conclude that the \(d_{eff}\) distributions of the collinear and XY principal plane are approximately centrosymmetric about the point (90°, 90°, 0). Figure 10b–d show the left, front and top views of the \(d_{eff} (\theta ,\varphi )\), respectively.

Fig. 10
figure 10

The effective nonlinear coefficient distributions of the XY principal plane and the collinear type-I (ss-f) THG, LBO, λ0 = 1053nm. a The distribution concerning polarization and azimuth angles; b Left view; c Front view; d Top view

Similarly, according to Eq. (14), the effective nonlinear coefficients of the arbitrary directions noncollinear THG are related to \(\theta_{i}\) and \(\varphi_{i}\)(i = 1,2,3) of the three wave vectors, it is related to six angles. As shown in Fig. 11, the effective nonlinear coefficients distributions of arbitrary directions and collinear (black points) type-I THG in the LBO crystal. Figure 11a represents the effective nonlinear coefficients corresponding to the near-axis and off-axis types, where the black curve is the collinear type. We can find that the effective nonlinear coefficients of the arbitrary directions type fill Fig. 10a, with the collinear type serving as a partial boundary, which is approximately centrosymmetric about the point (90°, 90°, 0). Figure 11b and c show the effective nonlinear coefficients for near-axis and off-axis types, respectively; Fig. 11d–f show the front, left and top views of Fig. 11a, respectively. From Fig. 11 we can conclude that the \(d_{eff}\) of arbitrary directions phase matching achieves the maximum and minimum value at XY principal plane collinear phase matching. Further, there exists a large number of phase-matching types in which \(d_{eff}\) close to the maximum and minimum values not only around the XY principal plane collinear phase matching point but also at the ends of the polarization angle range (near 0 or 180°) where the angle γ greater than 8°.

Fig. 11
figure 11

The effective nonlinear coefficient distributions of arbitrary directions and the collinear type-I (ss-f) THG, LBO, λ0 = 1053nm. a Near-axis, off-axis and collinear; b Near-axis and collinear; c Off-axis and collinear; d Front view; e Left view; f Top view

For 1053 nm type-II THG phase matching. As shown in Fig. 12, the effective nonlinear coefficient distributions for collinear (black points) and YZ principal plane which correspond to the results of the phase matching calculations in Figs. 4d and 7, respectively. According to Eq. (15), the effective nonlinear coefficients of the collinear are related to \(\theta_{i}\) and \(\varphi_{i}\)(i = 1,2,3), and the effective nonlinear coefficients of the YZ principal plane are related to the \(\theta_{2}\) of the second-harmonic wave vectors. Figure 12a is the distribution of \(d_{eff} (\theta ,\varphi )\), we can see that the maximum and minimum points of the collinear and YZ principal plane are consistent with each other, \((d_{eff} )_{\min }\) = − 0.47284 pm/V at φ = 90° and θ = 134.89°, \((d_{eff} )_{\max }\) = 0.47284 pm/V at φ = 90° and θ = 45.11°, and \(\left\{ {(d_{eff} )_{\min } } \right\}^{2} = \left\{ {(d_{eff} )_{\max } } \right\}^{2}\). We can also conclude that the \(d_{eff}\) distributions of the collinear and YZ principal plane are approximately centrosymmetric about the point (90°, 90°, 0). Figure 12b–d show the front, left and top views of the \(d_{eff} (\theta ,\varphi )\), respectively.

Fig. 12
figure 12

The effective nonlinear coefficient distributions of the YZ principal plane and collinear type-II (fs-f) THG, LBO, λ0 = 1053nm. a The distribution concerning polarization and azimuth angles; b Front view; c Left view; d Top view

Similarly, according to Eq. (15), the effective nonlinear coefficients of the arbitrary directions THG are related to \(\theta_{i}\) and \(\varphi_{i}\) (i = 1,2,3). Figure 13a represents the effective nonlinear coefficients corresponding to the near-axis and off-axis types, where the black curve is the collinear type. Figure 13b and c show the effective nonlinear coefficients for near-axis and off-axis types, respectively; Fig. 13d–f show the front, left and top views of Fig. 13a, respectively. We can also find that the effective nonlinear coefficients curves of the YZ principal plane and collinear serving as the boundary of the arbitrary directions, the effective nonlinear coefficients of Fig. 13 are approximately centrosymmetric about the point (90°, 90°, 0).

Fig. 13
figure 13

The effective nonlinear coefficient distributions of arbitrary directions, YZ principal plane and the collinear type-II (fs-f) THG, LBO, λ0 = 1053nm. a Near-axis, off-axis and collinear; b Near-axis and collinear; c Off-axis and collinear; d Front view; e Left view; f Top view

Table 1 represents the partial results of the GD method for solving the THG phase matching in arbitrary directions for LBO crystals at 1053 nm: phase matching angles, angles of three-wave vectors and effective nonlinear coefficients. The phase matching consists of Type-I and Type-II, each type including near-axis and off-axis. One set of phase matching solutions consists of the polarization and direction angles of three wave vectors, including six angles \(\theta_{1} ,\theta_{2} ,\theta_{3} ,\varphi_{1} ,\varphi_{2} ,\varphi_{3}\).

Table 1 Partial results of the GD method for solving THG phase matching in arbitrary direction at λ1 = 1.053 μm for LBO crystal

4 Conclusion

In this paper, we propose and derive a model for arbitrary direction phase matching, and successfully implement phase matching calculations based on the GD algorithm. For 1053nm THG in LBO crystal, including three subcategories: collinear, noncollinear in the XY and YZ principal planes, and noncollinear in arbitrary directions. It can be further divided into two subcategories: type-I (ss-f) and type-II (fs-f). For collinear and principal planes noncollinear THG phase matching, we compared our GD method with traditional analytical and exhaustive search methods, and the computed results exhibited a high degree of consistency. Furthermore, we obtained the distribution of phase matching angles and effective nonlinear coefficients for arbitrary direction noncollinear THG. We found that the collinear and principal planes phase matching curves constitute the outline of the distribution for arbitrary direction phase matching. The phase matching angles exhibit approximate symmetry around both θ = 90° and φ = 90°, and the near-axis and off-axis are approximately symmetric about θ = 90°. The effective nonlinear coefficients of the near-axis and off-axis are approximately centrosymmetric about (90°, 90°, 0). Besides, type-I possesses larger nonlinear coefficients and noncollinear angles compared to type-II. It has the largest nonlinear coefficient at collinear structure, while the angle γ is greater than 8° as the effective nonlinear coefficient approaches its maximum value.

Our method proves to be versatile for laser frequency conversion as arbitrary directions phase matching presents a more extensive range of solutions compared to collinear and noncollinear in principal plane phase matching. The phase matching of various types of both uniaxial and biaxial crystals can be calculated by our GD method. Not only 1053 nm wavelength, but other wavelengths can be applied as well. It could provide a higher conversion efficiency for SFG and DFG [2], a broader gain bandwidth for OPA and OPO [1, 4], a higher resolution and a larger temporal window for third-order auto-correlator [27].