Crosslinked polybenzimidazole membranes for organic solvent nanofiltration (OSN)_ Analysis of crosslinking reaction mechanism and effects of reaction parameters

Recently, polybenzimidazole (PBI) membranes crosslinked with dibromoxylene (DBX) were shown to retain their molecular separation performance in the harsh conditions characteristic of organic solvent nanofiltration (OSN). This work is focused on better understanding of the crosslinking reaction between PBI and DBX, and finding the parameters important for achieving higher degrees of crosslinking. A statistical approach based on Design of Experiments was used to identify the most significant parameters and interactions affecting the crosslinking reaction. High gain in weight and high bromine content after the reaction are expected to be indirectly related to membranes with high crosslinking degrees. Hence, these two responses were measured as a function of reaction temperature, reaction time, excess of DBX, concentration of DBX and reaction solvent (acetonitrile and toluene). All parameters were found to have a positive effect on both responses, and the reaction was found to be faster in acetonitrile than in toluene. All obtained results were statistically evaluated using Analysis of Variance, and a physical interpretation of the statistical models was attempted. & 2015 Elsevier B.V. All rights reserved.


Introduction
Liquid separation techniques play a key role in pharmaceutical and chemical processes, which also makes them a very attractive field for research and improvement. In the past decade organic solvent nanofiltration (OSN) has turned from an emerging membrane-based separation process into a proven and competitive separation process that can easily be implemented in already existing production lines [1,2]. Nevertheless, OSN is still facing several issues that need to be overcome for wider implementation [1,3]. Among them is the membrane stability in harsh organic solvents. Research on this challenge has been focused on finding new suitable materials [4,5] or improving existing ones [6][7][8][9][10][11][12] mainly based on knowledge from other membrane processes, e.g. aqueous nanofiltration (NF), reverse osmosis (RO) and gas separation. The most simple and effective way to achieve chemical stability is crosslinking the polymer. This method has been studied extensively for polyimide-based OSN membranes [6,13,14]. Recently, crosslinked and uncrosslinked polybenzimidazole (PBI) membranes have been shown to be suitable for OSN [15][16][17][18]. Xing et al. [15] reported PBI membranes phase inverted from an ionic liquid and subsequently crosslinked with 1,2,7,8-diepoxyoctane (DEO) in order to obtain a membrane stable in dimethyl sulfoxide (DMSO). Valtcheva et al. [16] reported on the fabrication of PBI membranes crosslinked with α,α′-dibromo-p-xylene (DBX) which exhibited superior chemical stability in N,N-dimethylformamide (DMF) and high concentrations of acids and bases as compared to other polymers typical for OSN. Further, they showed that crosslinked PBI membranes had reproducible performance from batch to batch. The use of PBI membranes crosslinked with DBX has already been reported for OSN membrane cascades [19][20][21], where the problem of insufficient membrane separation capability was addressed.
However, there is still little available information in literature about the crosslinking reaction between PBI and alkyl halides, and its effect on membrane separation. Information on crosslinking is essential for the development and scale up of PBI membranes. It is also of interest because the greater the extent of crosslinking, the more chemically robust the resulting membranes. Finally, there are few reports on the crosslinking of solid phase membranes by liquid phase reagents: yet as alluded to above this is an essential tool in rendering polymer membranes stable in organic solvent processes. Hence, the aim of the study is to investigate the mechanism of the crosslinking reaction and the parameters which affect it. To the best of our knowledge, there are no studies on PBI membranes crosslinked using alkyl halides for the application in NF or RO, which have investigated the possibility of di-substitution at the PBI backbone. Also, the only parameter which was addressed in previous work is the reaction time [22,23]. Wang et al. [23] reported on α,α′-dichloro-p-xylene crosslinked PBI NF membranes for separation of electrolytes and purification of cephalexin from aqueous solutions. They studied the effect of crosslinking time on the separation performance of the membranes and found that with increasing crosslinking time the effective pore sizes of the membranes were decreasing. Hence, a better separation was achieved. Another study by Wang et al. [22] showed an enhanced salt selectivity and water permeance with increasing crosslinking time for water recovery using forward osmosis.
The crosslinking reaction between PBI and DBX is an electrophilic alkylation reaction (Fig. 1). This type of reaction has been reported for imidazole and benzimidazole alkylations with alkyl halides [24][25][26]. The electrophillic attack occurs at the multiple bonded nitrogen (N 3 ) as shown in the first step of the reaction (Fig. 1) and gives a protonated N-alkyl-imidazole moiety (2) which is unstable and in a second step loses the hydrogen to unreacted imidazole (acting as a base). The compound (3) which is then formed can undergo further alkylation and can give a di-substituted imidazole moiety (4). Hence, these reactions give a mixture of compounds (2), (3) and (4). It has been suggested that the formation of compound (4) is favoured when an excess of alkylating agent is present and can be formed directly from imidazole [27].
Often, imidazole and benzimidazole are treated with a base such as NaH or LiH prior to addition of the alkylating agent to allow the deprotonation of N 1 in the imidazole ring and then subsequent formation of compound (3). Hu et al. [28] reported on the synthesis of mono-and di-substituted polybenzimidazole using iodomethane in N-methylpyrrolidone (NMP). They obtained 90% mono-substituted PBI (compound (3) where RX ¼CH 3 I in Fig. 1) by first deprotonating N 1 with LiH, followed by equimolar addition of iodomethane at room temperature. Addition of excess iodomethane to deprotonated PBI at 80°C yielded 100% substitution at N 1 and 30% substitution at N 3 . This product was further methylated (N 3 substitution was 90%) by addition of excess iodomethane in DMSO. Recently, Thomas et al. [29] and Jheng et al. [30] prepared quaternised polybenzimidazolium salts as materials for anion conducting membranes using the same procedure as described in [28].
In this study, the crosslinking reaction between PBI and DBX was performed without the use of a base to deprotonate the imidazole N 1 . The aim was to investigate the crosslinking reaction itself as well as the parameters which affect it. Five essential parameters were chosen: reaction time, reaction temperature, excess of crosslinker to polymer, concentration of crosslinker and reaction solvent. The samples prepared by crosslinking PBI and DBX were compared for chemical composition, changes in weight and thickness, and filtration performance. In order to identify the relevant parameters and their interactions, a statistical analysis based on Design of Experiments (DoE) was used. DoE is a systematic approach for evaluating cause and effect relationships, with the final goal of understanding and optimising a process [31]. The conventional approach, based on studying the effects of operating parameters by varying one factor at a time, would be in fact very inefficient for a complex system, such as the one proposed in this study. Furthermore, DoE allows the simultaneous variation of all factors, randomisation and replication of experiments. This approach is time and cost efficient as it works with a reduced number of experiments. Also, the experimental error can be isolated from the data by randomising and replicating the experiments. Another advantage of using this method is the possibility to optimise a process by choosing to minimise the working parameters without compromising the values of the responses. Such an optimisation will help in reducing production costs and waste. Although this approach has clear advantages, so far there are only few publications available in the field of membrane science regarding process development and optimisation [32][33][34][35] as well as membrane development and optimisation [36,37], which report an application of Design of Experiments.

Design of Experiments (DoE)
The crosslinking reaction between PBI and DBX was analysed using statistically designed experiments to allow the variation of more than one parameter at a time and hence, allowing for fewer experiments to be carried out with respect to the conventional one-factor-at-a-time approach. Design Expert s version 8 from Stat-Ease Inc. (USA) was used to obtain the values for each parameter for each set of crosslinked membranes. A linear 2-level factorial design was chosen as this type of design enables screening through a set of parameters and finding the significant ones. The design was made for 5 essential reaction parameters (temperature, time, molar excess of DBX in regards to PBI, concentration of DBX and reaction solvent) which were varied over two levels ( Table 1). The levels were coded as À1 for the minimal value of a factor and þ 1 for the maximal value.
A resolution V 2-level fractional factorial experiment (FRFE) was chosen as this would allow for identification of all main parameters and two-factor interactions, as three-factor interactions or higher are less likely to occur. The first-order mathematical model obtained by using FRFE designs is described as: where Ŷ represents the response value, b i and b ij are regression coefficients of single factor effects and double factor interaction effects, respectively, and X i and X j are independent parameters. These settings resulted in 16 experimental runs. Further, the combination of centre point values (level 0) for each parameter was prepared 3 times in order to estimate the pure error of the experiments as well as obtain information about the presence of curvature (i.e. non-linearity) in the model. The reaction solvent parameter (factor E in Table 1) was used as a categorical factor. This resulted in 3 centre points per solvent. Considering this, the total number of experimental runs to be carried out was 22 for the fractional factorial design. Two responses were measured after the crosslinking reaction and then analysed with the Design Expert softwarepercentage gain in weight of the membrane after the reaction (%WG) and the bromine (Br) content of the membrane after the reaction (%Br). Once all responses were collected, the accuracy of the linear model was validated by analysing the R 2 value, the lack-of-fit and the curvature using Analysis of Variance (ANOVA). The analysis showed a significant curvature, which indicated a possible non-linearity in the model. This means that the first-order dependence for all main effects could be insufficient to describe the relationship between them. Hence, an augmentation to a quadratic surface response model was necessary with secondorder dependence for the main effects. This model has the following mathematical description: The consequence of this extension was the need for 13 additional experimental runs. The total number was therefore 35.

Membrane fabrication and post-treatment
Membranes were cast from 17 wt% PBI/DMAc dope solution on a PP support fabric, followed by phase inversion in deionised water, as reported elsewhere [16]. Upon withdrawal from the water bath the membrane sheets were washed with IPA and circles with 20.4 cm 2 areas were cut out and stored in IPA prior to crosslinking. A total of five parameters of the crosslinking reaction were investigatedtemperature, time, molar excess of DBX in regards to PBI, concentration of DBX and reaction solvent. Two 20.4 cm 2 membrane pieces were used for each crosslinking set, one was vacuum dried and the other one was kept wet. After each reaction the two membrane discs were washed with IPA until no UV activity of the wash liquid was observed and therefore, ensuring complete removal of excess crosslinking reagents. Finally, the wet membrane sample was impregnated with PEG 400 in a solution of PEG 400 /IPA (1:1) for 4 h and used to obtain performance data. The dried sample was used to estimate the weight of the membrane before and after the reaction, as well as the content of Br in the polymer matrix.
Out of all 35 samples, 6 samples were crosslinked after peeling off the polymer layer from the backing as the reaction volume necessary for the combination of parameters was too small to accommodate the rigid membrane disc.

Percentage weight gain of polymer
The percentage weight gain of polymer (%WG) was chosen as one of the responses of interest as it can give information about the extent of reaction and it is easy to measure. It is speculated that the addition of crosslinker to the PBI backbone and formation of quaternary polybenzimidazolium salt will result in considerable weight gain that can be measured accurately with an analytical balance. The MW of one PBI unit is 308.4 g mol À 1 and the one of the crosslinking molecule DBX is 264 g mol À 1 . The reaction between them proceeds as shown in Fig. 1.
The %WG of the membrane is essentially the ratio of the weight gain of the membrane after the reaction over its initial weight in percent. represent the weight of PBI polymer experimentally measured before reaction and after reaction, respectively.

M
For the calculation, the weight of the membrane was taken including the weight of PP backing after the sample was vacuum dried for at least 4 h. The weight of the PP backing was then subtracted from the value to obtain the weight of the polymer itself. Three 20.4 cm 2 samples of PP were used to measure their weight, resulting in a constant value of 0.178 g. As the PP is not participating in the reaction, it can be expected that all the weight gain of the sample will be in the PBI matrix. This was confirmed by inserting PP discs in the reaction solution and recording their dry weight before and after.

Percentage bromine content in polymer
The percentage bromine content in polymer (%Br) was the second response analysed using the DoE approach. The Br content in the polymer was measured via elemental microanalysis using an Exeter Analytical EA-440 instrument. This instrument measured also the content of carbon (C), nitrogen (N) and hydrogen (H). To evaluate the accuracy of the elemental analysis, several samples from the same membrane were analysed. The results showed consistent Br content, but were less accurate for the analysis of C and H. This was most likely due to sample preparation, as the polymer was carefully peeled off the PP backing and dried prior to analysis. Unfortunately, it was noticed that small Table 1 Summary of the parameters, their coding and levels used to evaluate the crosslinking reaction between PBI and DBX, using the DoE approach.
Factor Name (unit) DoE levels fibres of PP stayed incorporated in the PBI and hence, the C and H content from sample to sample varied significantly. Nevertheless, the analysis for Br proved to be a useful parameter to evaluate the reaction. The value of this response is given in wt% with respect to the sample weight.

Membrane performance and analysis
All samples prepared according to the designed experimental run sheet (shown in Tables S1 and S2 in the Supplementary material) were also tested for their rejection and permeance using a solution containing 1 g L À 1 PS oligomers of two average MW ranges (580 g mol À 1 and 1300 g mol À 1 ) dissolved in acetonitrile [38]. The samples prepared as DoE run numbers 10, 13, 14, 20, 23 and 26 (Tables S1 and S2) were not tested, as these were the samples reported to above where the polymer layer was removed from the backing prior to the crosslinking reaction (Section 2.3). A rig equipped with crossflow cells was employed for testing membrane performance, as described elsewhere [16]. The effective membrane area in the cell was 14 cm 2 . Pressure was set at 10 bar, temperature was kept at 30°C and the crossflow pump flow rate was 100 L h À 1 . Rejection R i and permeance B were calculated using Eqs. (4) and (5), respectively, where C p,i and C f,i represent the concentration of solute i in the permeate and the feed, respectively and V is the collected permeate volume, Athe effective membrane area, tthe time and Δpthe applied trans-membrane pressure. The volume collected for permeate and feed samples was 1.5 mL. The samples were left in a fume cupboard to allow complete evaporation of acetonitrile. The PS remaining in each vial was then re-dissolved in 0.3 mL DMF [38]. The samples were analysed using an Agilent HPLC coupled with a UV/vis detector set a wavelength of 264 nm. A reverse phase Phenomenex column (C18-300, 250 mm Â 4.6 mm) was used and the mobile phases were THF and DI water, both buffered with 0.1% trifluoroacetic acid (TFA). The HPLC pump was operated at 0.7 mL min À 1 and the temperature of the column was kept at 30°C.
Small pieces of all crosslinked membranes, prepared for the study, were dried in vacuum and their total weight was measured and recorded. The samples were then immersed in pure DMAc and kept in the solvent for two weeks at 21°C. After this time, the membrane pieces were withdrawn from the solutions, washed thoroughly with water and dried in vacuum. Their weight was measured again and compared to the initial value.

Thickness measurement of polymer layer
Approximate values for the thickness of the polymer layer were measured from SEM images using an imaging software (ImageJ version 1.47) by choosing the longest part of the cross section. Six samples prepared for the DoE were selected for this measurement, three from each reaction solvent where the %WG and %Br were low, intermediate and high, respectively. As a control, an uncrosslinked membrane sample was also evaluated. The samples were prepared for SEM by carefully peeling off the PBI layer from the PP backing and pasting it vertically onto SEM holders. The samples were then sputtered with chromium in an argon atmosphere (Emitech K575X coater) to achieve the necessary conductivity. The microscopic analyses were performed at 5 kV in a high resolution SEM (LEO 1525 from Karl Zeiss).

Preliminary experimental results
The first step before actual data collection was to ensure that the chosen methodology will give an insight into the reaction without compromising the accuracy of the results. For this reason two experiments were used. The first one was to check whether heating the membranes in the reaction solvent will result in changes to their performance. Three pieces of different membrane sheets with the same polymer concentration of 17 wt% PBI were inserted in pure MeCN and were left at 80°C for 24 h. The rejection and permeance were tested in crossflow cells along with three pieces of uncrosslinked 17 wt% PBI membranes which were not in contact with boiling MeCN (Fig. 2). Fig. 2 shows that uncrosslinked 17 wt% PBI membranes have no retention of PS in the NF range. Also, the same type of membrane heated in MeCN followed the same retention profile as the nonheated one. However, the heated membrane presented a two-fold increase in permeance. It can be concluded that any change of PS rejections was only due to the DBX crosslinker, and the effect of annealing of the membrane in the reaction solvent played no role on the membrane selectivity.
The second experiment conducted before the DoE data collection was to confirm the presence of Br in the membrane after crosslinking. In order to do so, the DBX crosslinker was exchanged with benzyl bromide (BB). This molecule has only one Br site as compared to DBX. In this way, it is possible to conclude that any Br present in the membrane after the reaction is only due to the formation of a Br salt at the imidazole ring of PBI (Fig. 3 for simplicity only the benzimidazole moiety is shown). The reaction was performed as described in Section 2.3 and 1:2 molar ratio of PBI: BB was used.
Membrane samples from this reaction were tested for Br with elemental microanalysis along with samples from uncrosslinked and unmodified PBI membranes. To ensure that no residual BB was trapped unreacted in the membrane, the membranes were washed thoroughly with MeCN until no UV active compounds were detected in the wash solvent (benzyl ring absorbs at λ max ¼ 245 nm).
The results in Table 2 confirm the presence of Br in the membranes modified with BB. The calculated value for Br content for fully quaternised PBI backbone is 19.24 wt% and thus, around 84% of the PBI backbone was di-substituted.
The Br analysis becomes more complicated when a bifunctional compound, such as DBX, is used. The reaction between PBI and DBX could have Br present in the membrane matrix under two different forms. One is covalently bonded Br from unreacted sites of DBX and the other is Br under ionic form from the formation of quaternary salts. Elemental microanalysis is not capable of distinguishing these two forms. Nevertheless, it can be assumed that any Br present in the membrane samples is due to successful modification or crosslinking of the PBI backbone and can be used to monitor how well the reaction proceeds.

Analysis of influencing factors using DoE
A basic linear FRFE was created by selecting five essential parameters and setting their minimum and maximum levels (Table 1). The conditions for each DoE run and its corresponding %WG and %Br are summarised in Table S1. The values for %WG vary between 2% and 46% and the ones for %Br between 1.64 and 19.75 wt%.
The final equations in terms of coded factors for the statistical model for %WG and %Br are given by Eqs. (6) and (7), respectively. A transformation of the %WG response to %WG 0.5 was suggested by ANOVA to improve the normal distribution of the residuals. The analysis of designed experiments is best carried out using coded factors. This enables the use of a common scale for each factor, typically À1 and þ1 corresponding to minimum and maximum of the actual values, respectively. In the coded equation, the coefficient of a factor is the change in the response as the associated factor is changed by one coded unit.  (1)). The fact that the other regression coefficients are the same means that the effect of the other factors (A-D) on the response is not dependant on the solvent. However, the change in b 0 in the two models means that the solvent itself has an effect on the response. This was also clear in Eq. (6), where the factor E was found to have a negative effect on the response. This result means that changing from acetonitrile (level À 1) to toluene (level þ1) had an adverse effect on the response. In Eqs. (8a) and (8b), it is clear that this effect only means that using acetonitrile as reaction solvent yields a higher value of the %WG response than toluene. The same consideration holds for Eqs. (9a) and (9b).
The performance of the model was analysed using ANOVA in terms of correlation coefficients R 2 , lack-of-fit of the model and detection of possible curvature in the linear model. The coefficients of correlation for %WG and %Br are summarised in Table 3. The lack-of-fit p-value above 0.05 (significance level) suggests that lack-of-fit of the model is not significant relative to the pure error. While R 2 only gives information about how well the model fits the experimental data, the modified version of R 2 is adjusted to the number of variables in the model and its value would only increase if a new variable improves the model. The predicted R 2 is a measure of how well the model will predict new data and also indicates an over-fit of the model due to too many variables. The predicted R 2 value is in reasonable agreement with the adjusted R 2 , which indicates that the model is not over-fitted.
A significant curvature was detected for both models, which means that a quadratic model might be a better fit for describing the responses. The second-order model was obtained by using a response surface model (RSM). The conditions and measured responses for these experiments can be found in Table S2. Including the new results, the values for %WG vary between 2% and 46 % and the ones for %Br between 0.94 and 19.74 wt%. The performance of the quadratic models obtained using RSM was compared with the linear models using ANOVA. The analysis is summarised in Table 4.
It is interesting to note that for the %WG response both, linear and quadratic, models were suggested by ANOVA. The lack-of-fit p-value for both models is above the significance level of 0.05 which is desired for a good description of the experimental data. The quadratic model seems to give a better fit to the data as its R 2 Fig. 3. Expected reaction between PBI and BB (molar ratio of 1:2).  Fig. 3). is higher than the one of the linear model. However, the predicted R 2 value in the case of the quadratic model is negative which means that this model is over-fitted and will not accurately predict new data. Hence, the linear model was kept to describe this response and the final equations in terms of coded and actual factors are Eq. (10) and Eqs. (11a) and (11b), respectively. The best description of the response %Br is suggested to be with the quadratic model. There is non-significant lack-of-fit and the high R 2 value implies a good fit of the model to the experimental data. However, this model is over-fitted as the predicted and adjusted R 2 values are not in reasonable agreement. Hence, the insignificant parameters and interactions were selected and removed based on their p-values obtained from ANOVA, i.e. model terms with p-values greater than 0.05 (significance level) were considered insignificant. The new predicted and adjusted R 2 values were found to be in good agreement (last row in Table 4).
The importance of the effect of each parameter on the response is represented by the normalised effect. This is the coefficient for the associated model parameter in terms of coded factor units (Eqs. (10) and (12)). For better comparison, these are shown graphically in Fig. 4.
The importance of each factor and its positive or negative effect on the response can be deduced from Fig. 4. The reaction time (factor B) was found to have a strong positive contribution to the % WG and %Br of the membrane. This is in agreement with previous reports on the effect of crosslinking time which have shown that longer reactions result in increased densification of the membrane pores due to higher crosslinking density [13,23,22,39]. This effect has been attributed to the way the reaction between the polymeric matrix and crosslinker occurs [23], i.e. the reaction starts at the membrane outer surface and proceeds then in the inner part of the membrane. The latter may be limited by diffusion of the crosslinker into the polymer and hence, longer time is required for the reaction to take place there. Interestingly, the quadric term of the reaction time (B 2 ) had a strong negative effect on the response %Br (Fig. 4). This effect, coupled with the positive effect of time, means  that the response increased until an optimum was reached beyond which the time factor will not change the response or will influence it negatively. In terms of the reaction, it can be deduced that the increase in crosslinking became negligible as the reaction time increased beyond a certain point as a polymer degradation or reversibility of the reaction is not expected. The second-order model obtained for %Br was able to predict this phenomenon. A positive effect of temperature (factor A) on both responses is expected as increasing the temperature generally leads to higher crosslinking degrees [40,41]. This is due to the fact that higher temperatures increase the mobility and kinetic energy of participating molecules and hence, the reaction rate increases too. Furthermore, the viscosity of the reaction solvent decreases significantly at elevated temperatures (Table 5) and thus, better diffusivity of the molecules leads to faster reaction rates. Also, heating has been shown to promote N-alkylation of imidazoles and formation of quaternary imidazolium salts [27]. Fig. 5 shows the change in %Br with temperature and time. It can be seen, that the value of the response increased as time was kept constant and temperature increased. The same effect was observed for the %WG response (not shown here).
Changing the reaction solvent (factor E) from acetonitrile to toluene, coded as À1 and þ 1, respectively, resulted in a negative effect on both responses (Fig. 4). The physical meaning behind this is that lower crosslinking was achieved in toluene as compared to acetonitrile. The reason for this observation may be attributed to a combination of the following explanations: (1) different solventpolymer mutual affinities resulting from different solvent properties and (2) slower reaction kinetics in toluene as compared to acetonitrile. Polymer-solvent mutual affinities are commonly described using Hansen solubility parameters (HSP) δ [42,43]. The difference between the solubility parameter of the polymer and the solvent, Δδ i.j , can be used as a measure of their affinity in terms of thermodynamic similarities. Low values of Δδ i,j indicate a good mutual affinity for a given polymer-solvent pair. As can be extracted from Table 5 the values for Δδ PBI,MeCN and Δδ PBI,Tol are 0.9 MPa 1/2 and 6.6 MPa 1/2 , respectively. Hence, the solubility parameters predict a better affinity between PBI and acetonitrile than between PBI and toluene. These theoretical values on interactions between polymer and solvent can be interpreted in terms of better swelling of PBI in acetonitrile than in toluene. Ogunlaja et al. [44] have measured the swelling of PBI nanofibers in acetonitrile and hexane over time and have shown that PBI had a swelling ratio of 4.5 in acetonitrile as compared to only 2 in hexane. In other words, PBI has a poor affinity to non-polar solvents such as toluene. During the crosslinking reaction, a better swelling of the polymer in the reaction solvent can favour faster permeation of the crosslinker through the membrane and hence, a higher extent of crosslinking can be achieved in acetonitrile than in toluene. Furthermore, from Fig. 5 it can be deduced that the reaction kinetics in toluene are slower than in acetonitrile, i.e. the same value of the response is achieved at longer reaction time in toluene as compared to acetonitrile at constant temperature. The crosslinking reaction between PBI and DBX is an electrophillic alkylation reaction and it has been shown previously that these types of reactions have faster kinetics in polar aprotic solvents [45] as is acetonitrile in this case. Other polar aprotic solvents with large dielectric constants (DK) include DMF and DMSO. However, these  solvents are unsuitable as they dissolve the uncrosslinked polymer. Overall, acetonitrile is a more suitable solvent than toluene due to its high polarity, low viscosity and low molar volume ( Table 5). The last two factorsconcentration of DBX (factor D) and excess of DBX (factor C)both have a positive effect on the %WG response (Fig. 4). However, in the second-order model for the response of %Br two more terms appearedan interaction term between the concentration and the excess of DBX and a quadratic term of the excess of DBX (Fig. 4). Although, the excess of DBX on its own had no significant effect on the response, the appearance of an interaction term between excess and concentration of DBX means that their combined change had a more pronounced positive effect on the change of %Br than the positive effect from the additive change of the single variables. Furthermore, the quadratic term of the DBX excess adds an even more pronounced positive effect on the response. This is expected, as increasing concentration and excess of a reagent results in faster reaction rates. Also, it has been shown previously that the addition of excess alkylating agent promotes the formation of quaternary polybenzimidazolium salts [27,28].
As the statistical analysis showed, the reaction time had the most pronounced effect on increasing the values of the responses. Thus, it was speculated, that increasing the reaction time beyond 24 h while keeping all other parameters at their maximum level and using acetonitrile, higher yields could be reached. The reaction time was varied between 15 min and 5 days and the membranes were again tested for %WG and %Br (Fig. 6).
It was found that the change in %Br content is negligible with increasing time after 12 h (Fig. 6) as predicted by the second-order model obtained from DoE (Eq. (12)). On the other hand, the plateau of the %WG response was found to be after 48 h of reaction. This is outside of the design space used in the DoE and hence, the model recognised a linear positive effect of the response with increasing time (Eq. (10)). This difference could be due to the different nature of the responses. The %WG reflects the weight of the polymer itself and the weight of the crosslinker attached to the backbone (either mono-or di-substituted) in its value. Whereas the value of %Br involves only Br found in the membrane sample which comes from two sources: (1) formation of polybenzimidazolium salts (compound (4) in Fig. 1) due to di-substitution of the backbone and (2) unreacted DBX sites, i.e. one of the Br atoms in the DBX molecule has not reacted. The monosubstituted benzimidazole moiety has no Br present in the structure (compound (3) in Fig. 1) and is hence, not reflected in the value of %Br. The observed increase in the value of %WG coupled with the constant value of %Br beyond 12 h of reaction could mean that only substitution at N 3 of the imidazole ring ( Fig. 1) is taking place. The formation of quaternary polybenzimidazolium salts after 12 h could be limited due to steric hindrance, as the DBX molecule is bulky. With increasing reaction time the polymer network becomes denser and the PBI matrix more rigid. Hence, the diffusion of DBX into the polymer and the formation of disubstituted benzimidazole moieties is restricted in the confined space between the PBI chains.

Membrane performance and analysis
The performance of the membranes was evaluated by crossflow filtrations using PS dissolved in acetonitrile at 10 bar and 30°C. Filtrations were performed for 24 h and the PS rejections at the end of the experiments are reported in Fig. 7.
The graphs in the middle (at 12.25 h of crosslinking) represent the centre points from the DoE. As can be seen from the data, the rejections for the centre points are very similar, which means that the experimental procedure is reproducible. Comparing the performance of the membranes crosslinked in acetonitrile to the ones crosslinked in toluene, it can be concluded that membranes crosslinked in toluene are more open or in other words less crosslinked after 0.5 h reaction whereas membranes crosslinked in acetonitrile for 0.5 h resulted already in NF membranes. As described above, the reaction has better kinetics in acetonitrile than in toluene. The rejections observed for 12.25 h and 24 h of crosslinking showed no significant differences between acetonitrile and toluene. The membrane samples were soaked in DMAc for two weeks and all samples were found to have a negligible weight loss, except for two samplesrun 1 and run 35. The DMAc solutions of these two samples were found to be yellow which is an indication that the polymer has dissolved in the solvent and hence, these samples were not chemically stable. Both samples had the lowest crosslinking values and it can be deducted, that %WG above 8% and %Br values above 2.5 wt% are sufficient to obtain chemically stable membranes.
The performance of the membranes crosslinked in acetonitrile and constant temperature (80°C), concentration (5 wt%) and excess of DBX (20:1) at varied times (from 15 min to 5 days) was also evaluated. PS rejections and permeances after 24 h filtration of PS/ MeCN at 10 bar and 30°C are shown in Fig. 8. The rejection data shows a shift of the MWCO to the left for membranes prepared at 0.25, 0.5, 12 and 24 h, i.e. tighter membranes are obtained due to higher degrees of crosslinking. However, membranes crosslinked for 48 h and longer showed no change in rejection curves as compared to the membrane crosslinked for 24 h, indicating that further crosslinking had no result on the rejection performance of PBI membranes. It is interesting to note that the permeance values for these membranes showed a trend different from that expected. Typically, high rejections are coupled with low permeances, and vice versa, low rejections are coupled with high permeances [1]. However, the effect of crosslinking time on the permeance of crosslinked PBI membranes showed increasing values until an optimum was reached at 24 h after which the permeance decreased.
Introducing the DBX crosslinking to PBI membranes renders them more hydrophilic [16] due to the formation of hydrophilic quaternary imidazolium salts [29]. This could likely be the reason for increasing permeance with increasing crosslinking time. Bhanushali et al. [48] reported higher permeances for polar solvents when hydrophilic membranes were used. In addition, Valtcheva et al. [16] tested crosslinked PBI membranes with different surface hydrophilicity based on contact angle measurements and found that the membranes with more hydrophilic surface had higher permeances in polar solvents than the less hydrophilic ones. However, as shown above in Fig. 6, the Br content of the membranes reached a steady value after 12 h of crosslinking whereas mono-alkylation of the benzimidazole moiety proceeded beyond this, possibly resulting in denser membranes with lower permeances. In other words, it is likely that the membrane became more rigid upon higher crosslinking which resulted in lower swelling ability and hence, lower permeances. In that range of porosity, a small increase in the swelling degree could cause an  appreciable change in flux, while the steric effects in the rejection are not significantly modified. Similar results have been reported by Vanherck for PI [14] and Musale for chitosan/PAN membranes [49].

Thickness measurement of polymer layer
The thickness of the PBI layer was measured in order to find correlations between the analysed responses (%WG and %Br) as well as the membrane rejection and permeance. The samples chosen for this were runs 17, 25 and 12 crosslinked in acetonitrile and runs 1, 8 and 16crosslinked in toluene. Their characterisation can be found in Tables S1 and S2. Uncrosslinked membranes, both heated and not heated in acetonitrile, were also used as control membranes. Fig. 9 shows the SEM images of the cross sections and the relative thickness of the PBI layer.
It can be seen that there is no change in the thickness of the polymer layer for uncrosslinked membranes upon heating in acetonitrile ( Fig. 9a and b). The images show that the introduction of the crosslinker into the membrane matrix resulted in morphological changes such as thicker polymer layers and appearance of finger-like macrovoids. Clearly, there was a trend in increasing thickness as the percentage of gain in weight and Br content increase, as also shown in Fig. 10. The MWCO of these membranes also increased with increasing thickness, although no correlation was found between permeance and thickness.

Conclusions
Polybenzimidazole (PBI) membranes were prepared and crosslinked with dibromoxylene (DBX) in order to analyse the reaction mechanism and identify the main effects of the reaction parameters. The proposed mechanism of the reaction was validated by detecting bromine (Br) in the membranes and thus, confirming the formation of salt complexes.
The parameters influencing the crosslinking reaction were investigated using a Design of Experiments (DoE) approach. The percentage gain in weight (%WG) and Br content (%Br) of PBI after the reaction were used as indirect indication of how far the reaction has proceeded, i.e. higher values of %WG and %Br are likely associated with higher crosslinking density. Statistical models were obtained for these two responses as a function of reaction time, temperature, excess of crosslinker to polymer, concentration Fig. 9. SEM images of cross sections of uncrosslinked and crosslinked PBI membranes, prepared according to the conditions shown in Tables S1 and S2. The estimated polymer layer thickness is indicated on each image. of crosslinker and reaction solvent based on DoE and ANOVA. All studied parameters showed a positive effect on the responses and the reaction was found to be faster in acetonitrile as compared to toluene. Further, the reaction time showed to have the most significant influence on increasing the values of the responses as well as on changing the membrane performance. However, it was found that carrying out the reaction beyond 24 h resulted in a negligible change in MWCO and a negative change in membrane permeance. Physical interpretation to explain these effects was attempted.
In conclusion, the results in this study showed that by varying reaction parameters a range of chemically stable PBI membranes can be prepared to suit specific separation needs. Further, the statistical models can be used to predict which reaction conditions will maximise the responses at the lowest possible reaction time or quantity of reagents. This information can be helpful when scaling up the membranes as it will result in reduced production costs.